<?include "conninfo.php";
$fn=$_POST["fname"];
$sn=$_POST["sname"];
$ff=$_POST["ffood"];
$pc=$_POST["pcode"];
$job=$_POST["thejob"];

$query="INSERT INTO people
(firstname,surname,favfood,postcode,jobid)
VALUES(?,?,?,?,?)";
$stmt=mysqli_stmt_init($link);
mysqli_stmt_prepare($stmt,$query);//query without parameters

mysqli_stmt_bind_param($stmt,"ssssi",$fn,$sn,$ff,$pc,$job);

$test=mysqli_stmt_execute($stmt);
echo $test;
mysqli_stmt_close($stmt);
mysqli_close($link);


?>
<br><br>
<a href="showall.php">Back to Show All page</a>