Answers for "get info if prepared statement worked mysql php"

PHP
2

mysqli_connect using prepare statement

$stmt = $mysqli->prepare("INSERT INTO myTable (name, age) VALUES (?, ?)");
$stmt->bind_param("si", $_POST['name'], $_POST['age']);
$stmt->execute();
$stmt->close();
Copy
Posted by: Guest on May-20-2020
0

mysqli_connect using prepare statement

$stmt = $mysqli->prepare("UPDATE myTable SET name = ? WHERE id = ?");
$stmt->bind_param("si", $_POST['name'], $_SESSION['id']);
$stmt->execute();
$stmt->close();
Copy
Posted by: Guest on May-20-2020

Code answers related to "get info if prepared statement worked mysql php"

Browse Popular Code Answers by Language