Hello W3SchoolsForums;
Question 1: Does the PDO module have to be installed on the server for the below query to work?
Question 2: Is the $dbh variable used only to assign to the $stmt variable or does it have an additional use?
$stmt = $dbh->prepare("INSERT INTO Customers (CustomerName,Address,City)
VALUES (:nam, :add, :cit)");
$stmt->bindParam(':nam', $txtNam);
$stmt->bindParam(':add', $txtAdd);
$stmt->bindParam(':cit', $txtCit);
$stmt->execute();
Source:
http://www.w3schools.com/sql/sql_injection.asp
Thanks.