How to pass the option value in a list to if ($ roomID! = Null) {$ result = mysql_query ("SELECT & nbsp; roomID, roomtype, roomsize & nbsp; FROM & nbsp; room & nbsp; WHERE & nbsp; roomID & nbsp; NOT & nbsp; how to pass the option value in a list to the next php interface
If ($ roomID! = Null)
{
$ Result = mysql_query ("SELECT roomID, roomtype, roomsize FROM room WHERE roomID not in (SELECT roomID FROM bookingroom WHERE bookingdate = '$ bookingdate' AND bookingtime = '$ bookingtime ') AND roomID = '$ roomid '");
$ Num_rows = mysql_num_rows ($ result );
If ($ num_rows = 0 ){
Echo" Sorry, No result found. Please search again.
";
}
Else {
While ($ row = mysql_fetch_array ($ result ))
{
Echo"";
Echo"". $ Row ['roomid']."";
Echo"". $ Row ['hosttype']."";
Echo"". $ Row ['roomsize']."";
Echo" ";
Echo"";
}
}
}
How can I upload the data selected on my webpage to insert_data.php? PHP MySQL search
------ Solution --------------------
echo "
";
Add the ID parameter after the file name. the parameter value is the ID of the corresponding row data.
------ Solution --------------------
Try the get method
------ Solution --------------------
You can use js to obtain the attributes of each row. you can locate each row by searching for table tr td, and then pass the value through the url.
------ Solution --------------------
Store cookies during js onSubmit
On the other side of php, you can get it.