Skip to content

Instantly share code, notes, and snippets.

@mcorkum
Created May 12, 2016 04:32
Show Gist options
  • Save mcorkum/d00402151f1f685c710bfeb7ecb81d07 to your computer and use it in GitHub Desktop.
Save mcorkum/d00402151f1f685c710bfeb7ecb81d07 to your computer and use it in GitHub Desktop.
Procedural
$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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment