Hi all,
I think I did not explain well before.
I want to book an appointment.
once the button is clicked to find an appointment the following query is executed:
$query = "SELECT
h.name,
h.location,
h.address,
DATE_FORMAT(t.app_date, '%a,%e %M, %Y, %l:%i%p') AS newdate
FROM hospital h, time_slot t
WHERE t.hospital_id = h.hospital_id
AND h.name = '{$_POST['hosp']}'
AND t.slot_ava = 'Y' ";
the result of this query is the available appointments and displayed in table
I wat to book an appointment by having a book now link next to each row.
each appointment has a slot ID, how can I convert that to a link with book now
which I want to post
below is my table code:
echo '<table border="1" align="center" cellspacing="2" cellpadding="2">
<td align="left"><b>Hospital</b></td>
<td align="left"><b>Location</b></td>
<td align="left"><b>Address</b></td>
<td align="left"><b>Appointment Date & Time</b></td>
</tr>';
// print record
$bg = '#eeeeee';
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
$bg = ($bg=='#eeeeee' ? '#ffffff' : '#eeeeee');
echo '<tr bgcolor="', $bg, '"><td align="left">', stripslashes($row[0]), '</td><td align="left">', $row[1], '</td>
<td align="left">', $row[2], '</td>
<td align="left">', $row[3], '</td>
</tr>';
}
echo '</table>';
any help is appreciated.
many thanks