Answer the question
In order to leave comments, you need to log in
How to get the result of a prepared query?
You need to get the result of the request by the received ID. I'm trying to do it like this:
try {
$sql = 'SELECT * FROM tricks WHERE id = :id';
$s = $pdo->prepare($sql);
$s->bindValue(':id', $_POST['id']);
$s->execute();
} catch (Exception $ex) {
include $_SERVER['DOCUMENT_ROOT'] . '/includes/error.html.php';
exit();
}
$row = $s->fetch();
$name = $row['tname'];
$description = $row['tdescription'];
include 'test.php';
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question