BusBooking.php

[insert_php]
$DepartingFrom=($_POST[“DepartingFrom”]);
$TravellingTo=($_POST[“TravellingTo”]);
$TravelDate=($_POST[“TravelDate”]);
$ReturnDate=($_POST[“ReturnDate”]);

$hostname=”localhost”;
$username=”BusBooking”;
$userpassword=”B4me#2019199326″;
$dbname=”f4396036_BusBooking”;
$usertable=”DataBooking”;

$link=mysqli_connection(localhost,BusBooking,B4me#2019199326,DataBooking);

if ($link===false){
die(“Error:colud not connect.”.mysqli_connect_error());
}
$sql=”INSERT INTO $DataBooking(DepartingFrom,TravellingTo,TravelDate,ReturnDate”) VALUUES(‘$DepartingFrom’,’$TravellingTo’,’$TravelDate’,’$ReturnDate’);

if(mysql_query($link,$sql)){
echo “Records added successfully”;
}
else {
echo “ERROR: could not able to execute $sql.”.$mysqli_error($link);
}
$mysqli_close($link);
[insert_php]