PHP set up time help please?

Radicular

New member
So basically I created a web form that allows, lets say a Doctor, to chose their available timings during the month of February, and then once they hit submit, displays the available times in the calender as radio buttons from which the patient can select a time. The patient would enter their name in a text box up top ($student_name) and select one of the radio buttons for available times and then hit submit. After this, that time slot that they chose should have their name next to it and should no longer be a radio button but just a printed time with their name next to it.

So this code is for Monday Feb 2 only. I know it's probably bad coding and messy, but I don't really have enough time (or knowledge) to make it more efficient at the moment. I think I need to use some sort of hidden fields but I'm not sure. Basically how do I take the time selected by the person and print it out with the persons name?

P.S $MondayTimes is a $_POST array from the index.html page including all the time options for Monday in the web form

while($day <= 7) {
//makes the first row for feb
echo "<td width=14%><b>" . $day . "<br><br><br>";
if ($day == 2) {
foreach($MondayTimes as $temp2){
echo"<form>
<input type=\"radio\" name=\"time\" value=\"temp2\" /> $temp2<br />
</form>";

if ($MondayTimes >= 1){

echo $MondayTimes . " - " . $student_name . "<br />";

}
}

}
 
Back
Top