php pdo prepared statement using unbounded value
<?php
$pdo = require 'connect.php';
//using passholder position
$sql = 'insert into authors(first_name, last_name)
values(?,?)';
$statement = $pdo->prepare($sql);
$statement->execute(['Sandra', 'Aamodt']);
Code language: HTML, XML (xml)
// using named parameters
$sql = 'insert into authors(first_name, last_name)
values(:first_name,:last_name)';
$statement = $pdo->prepare($sql);
$statement->execute([
'first_name' => 'Henry',
'last_name' => 'Aaron'
]);