If I were to do a JavaScript prompt and allow a user to enter the information, how do I store this information into the database?
<?php
if(isset($_GET['cancel_req_id']))
{
echo "<script>var reason = prompt('Reason')</script>";
$res = "<script>document.write(reason)</script>";
$query="UPDATE booking SET status='Cancelled', s_approval='', s_authorize='', cancellation='$res' WHERE req_id='$id'";
$result=$conn->query($query);
echo "<script>alert('Booking cancelled!')</script>";
echo "<script>window.location=('status.php')</script>";
}
?>
this is my current code.