This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function handleComments() { | |
global $conn; | |
$success = false; | |
$err = ""; | |
if(isset($_POST["send"])) { | |
//echo "you have pressed submit </br>"; | |
if (!empty($_POST["fullname"])) { | |
$fn = sanitize_input($_POST["fullname"]); | |
//echo "You have entered your name. </br>"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$query = "INSERT INTO feedback (name, email, comment) VALUES ('$fn', '$em', '$comm')"; | |
if (mysqli_query($conn, $query)) { | |
echo "New record created successfully"; | |
} else { | |
echo "Error: " . $query . "<br>" . mysqli_error($conn); | |
} | |
mysqli_close($conn); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$sql = "INSERT INTO feedback (name, email, comment) VALUES ('$fn', '$em', '$comm')"; | |
if ($conn->query($sql) === TRUE) { | |
echo "New record created successfully"; | |
} else { | |
echo "Error: " . $sql . "<br>" . $conn->error; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$query = "INSERT INTO tableName VALUES (DEFAULT,'$fullname', '$email', '$comment')"; | |
or: | |
$query = "INSERT INTO tableName (fullname, email, comment) VALUES ('$fullname', '$email', '$comment')"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @package Carleton Gallery | |
*/ | |
/* | |
Plugin Name: Carleton Gallery | |
Plugin URI: http://carleton.ca/webservices | |
Description: Override Default WP Gallery Shortcode with something better. | |
Version: 1 | |
Author: Mike Corkum |
NewerOlder