Note: Usage of mysql extension was deprecated in PHP 5.5.0, and it was removed in PHP 7.0.0. Instead, the MySQLi or PDO_MySQL extension should be used.
You have made some few mistakes so that the query might not be inserting datas into the phpmyadmin database. The basic error you have made is in the insert query by not concatenating the values that you want in the VALUES section and the insert statement syntax will be like this.
INSERT INTO table_name (column1, column2, column3,...) VALUES (value1, value2, value3,...)
Note: If a column is AUTO_INCREMENT (like the "id" column) or TIMESTAMP (like the "reg_date" column), it is no need to be specified in the SQL query; MySQL will automatically add the value.
Replace your Insert Code with the following
$query = "INSERT INTO booking(`name`,`email`,`contact`,`room`,`adult`,`children`,`arrival`,`departure`,`date`,`status`) VALUES('".$name."','".$email."','".$contact."','".$room."','".$adult."','".$children."','".$arrival."','".$departure."','".$date."','".$status."')";
Ensure all the values that i give in the table(
column2) are correct as per the table structure that you have.
You are missing mysql connectivity code in the code that you have provided.
Ensure that you have placed the connectivity code to your file.
$dbhost = 'localhost';
$dbuser = 'root';
$dbpass = '';
$conn = mysql_connect($dbhost, $dbuser, $dbpass);
if(! $conn )
die('Could not connect: ' . mysql_error());
echo 'Connected successfully';
mysql_select_db( 'TUTORIALS' );
Note: You first put echo to the Insert Statement and then break the execution by putting the exit; and you copy the statement that is echoed and place it in SQL of the DB and then check whether any error occurs in insertion. If no error occurs remove the echo and delete the exit;
And after all the check i am suggesting you to check the Note that i have mentioned just above to this line since it will be delivering you with the perfect error what you have made.