hello im doing a driving instructor website for my project, and a driving instructor enters his or her times of booking and the search below gets the results and displays them, but i want the user to be able 2select upto 2results and once they have selected them they click on a button called book which sends the selected date and time to the database table.
thank u

// Select database
mysql_select_db("", $connection)
or die("Cannot find DB");


// Retrieve the data
$result = mysql_query($sql, $connection);


// Loop through data and display
while($a_row = mysql_fetch_assoc($result))
echo "<tr><td style=\"color:Black\">".$a_row."</td>".
"<td style=\"color:Black\">".$a_row."</td>".
"<td style=\"color:Black\">".$a_row."</td>".
"<td style=\"color:Black\">".$a_row."</td>".
"<td style=\"color:Black\">".$a_row."</td>".
"<td style=\"color:Black\">".$a_row."</td>".
"<td style=\"color:Black\">".$a_row."</td>".
"<td style=\"color:Black\">".$a_row."</td></tr>";

// Close connection ! (please !)
mysql_close($connection);

?>

Hi Sukhy, your post looks more like a project specification then a problem description. If you want me to program this thing for you, I'll do it for 40 USD per hour. I would give you price estimation after we would get together some proper specs.

If you have some specific problem though, please invest more time into describing exactly what it is. Advices are free.

hello again i just wanted 2no how to select an output from the search what code could i use 2select the option??

It depends on how you want to design the page ! You can have checkboxes to select the desired dates. These checkboxes should hold the id of the dates. Then when the user clicks on "Book", it should fetch the date and time from the available_dates (?) table for that particular id and insert it to the booking table.

This article has been dead for over six months. Start a new discussion instead.