The Challenge
The challenge was to develop an online hotel room booking engine website where hoteliers can register & maintain their database for availability of rooms. One should be able to register & login, search the hotel rooms & check for availability, book a room & if needed cancel the booking. Registered users should also be able to pay online using PayPal & Credit Cards for their bookings.
The Solution
The website allows users/hoteliers to register & maintain their account online. Hoteliers can list their website & maintain the statistics of availability of rooms. User can also search, book, pay & cancel hotel rooms. Access to the detailed specific country & city guides is also there for user's convenience.
The Technology PHP & MYSQL
The Benefits
This is an online hotel room booking engine website with features like search, book, cancel & pay online. It is very easy to book rooms & pay online through this website. This website provides wide range of hotels with various categories in rooms.
";
if($exit == 1)
exit;
}
return $db_rec_row_array;
}
//use to insert record
function insert($query,$debug=0)
{
if(trim($query) == "")
die("Query is Empty: ".mysql_error());
/*
This is used to check that query has insert word or not
If you try to execute other types of query in that case this will give the error
*/
if(!preg_match("/^insert/i",$query))
die(" Invalid Query: ".$query." ");
$this->result = mysql_query($query,$this->links);
if(!$this->result)
die(" Result Erorr: ".mysql_error()." ".$query." ");
/*
This is used to debug the code and print the query
You have to pass 1 (one) as the second argument of the edit function
Default is $debug 0 set.
*/
if($debug == 1)
{
print "
";
exit;
}
return $this->result;
}
//use to update record
function update($query,$debug=0)
{
if(trim($query) == "")
die("Query is Empty: ".mysql_error());
/*
This is used to check that query has update word or not
If you try to execute other types of query in that case this will give the error
*/
if(!preg_match("/^update/i",$query))
die(" Invalid Query: ".$query." ");
$this->result = mysql_query($query,$this->links);
if(!$this->result)
die(" Result Erorr: ".mysql_error()." ".$query." ");
/*
This is used to debug the code and print the query
You have to pass 1 (one) as the second argument of the edit function
Default is $debug 0 set.
*/
if($debug == 1)
{
print "
";
exit;
}
return $this->result;
}
//use to insert, update, replace and delete record
function delete($query,$debug=0)
{
if(trim($query) == "")
die("Query is Empty: ".mysql_error());
/*
This is used to check that query has delete word or not
If you try to execute other types of query in that case this will give the error
*/
if(!preg_match("/^delete/i",$query))
die(" Invalid Query: ".$query." ");
$this->result = mysql_query($query,$this->links);
if(!$this->result)
die(" Result Erorr: ".mysql_error()." ".$query." ");
/*
This is used to debug the code and print the query
You have to pass 1 (one) as the second argument of the edit function
Default is $debug 0 set.
*/
if($debug == 1)
{
print "