Skip to content

Instantly share code, notes, and snippets.

@J2112O
Created October 3, 2020 20:50
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 J2112O/6bddb5e03b62b45120363da7ec679646 to your computer and use it in GitHub Desktop.
Save J2112O/6bddb5e03b62b45120363da7ec679646 to your computer and use it in GitHub Desktop.
// prepare insert statement
$insert_sql = "INSERT INTO `user_details`(`first_name`, `last_name`)
VALUES(:first_name, :last_name)";
$insert_stmt = $pdo->prepare($insert_sql);
$insert_stmt->bindValue(':first_name', $first_name);
$insert_stmt->bindValue(':last_name', $last_name);
$insert_stmt->execute();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment