Commit 45caf324 authored by sam.markey's avatar sam.markey

receipt script

parent 6042b7ca
<?php
if(isset($_POST['bookingID']) && isset($_POST['username'])){
require_once 'connect_db.php';
$bookingID = htmlspecialchars($_POST['bookingID']);
$username = htmlspecialchars($_POST['username']);
$stmt = mysqli_stmt_init($connect);
$sql = 'INSERT INTO `receipt_has_user_museum` VALUES (?,?);';
if(!mysqli_stmt_prepare($stmt,$sql)){
echo 'failure';
}
else{
mysqli_stmt_bind_param($stmt,'is',$bookingID,$username);
mysqli_stmt_execute($stmt);
echo 'success';
}
mysqli_stmt_close($stmt);
}
else {
echo "checkisset";
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment