Answers for "how to use prepare statement in php"

PHP
2

mysqli_connect using prepare statement

$stmt = $mysqli->prepare("DELETE FROM myTable WHERE id = ?");
$stmt->bind_param("i", $_SESSION['id']);
$stmt->execute();
$stmt->close();
Copy
Posted by: Guest on May-20-2020
2

php mysql prepare query

$stmt = $mysqli->prepare("SELECT * FROM myTable WHERE name = ? AND age = ?");
$stmt->bind_param("si", $_POST['name'], $_POST['age']);
$stmt->execute();
$stmt->close();
Posted by: Guest on February-27-2020

Browse Popular Code Answers by Language