I have two tables, reservation and users. I want the column username and password to be also inserted in users table when the user filled the form. My query for reservation table is working but not in users table.
Php code:
if(isset($_POST['submit'])){
$sql="INSERT INTO reservation
VALUES (null,
'".$_POST['type']."',
'".$_POST['title']."',
'".$_POST['fname']."',
'".$_POST['lname']."',
'".$_POST['contact']."',
'".$_POST['username']."'
,'".$_POST['password']."',
'".$_POST['email']."',
'".$_POST['address']."',
'".$_POST['checkin']."',
'".$_POST['checkout']."');";
$sql .= "INSERT INTO users
VALUES (null,'".$_POST['username']."','".$_POST['password']."','client');";
mysqli_multi_query($conn,$sql);
mysqli_close($conn);
header("Location: login.php");
}