Skip to content

Instantly share code, notes, and snippets.

@amardeep18
Created July 19, 2020 03:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amardeep18/24fcf2fde2c1a0c21e73b940e0289a17 to your computer and use it in GitHub Desktop.
Save amardeep18/24fcf2fde2c1a0c21e73b940e0289a17 to your computer and use it in GitHub Desktop.
<?php
//insert.php
if(isset($_POST["post_name"]))
{
$connect = mysqli_connect("localhost", "root", "", "auto_refresh");
$post_name = mysqli_real_escape_string($connect, $_POST["post_name"]);
$sql = "INSERT INTO tbl_post (post_name) VALUES ('".$post_name."')";
mysqli_query($connect, $sql);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment