<html> <head> <script type="text/javascript" language="javascript"> function passengersname(textbox) { i = textbox.value; a = true; var testDiv = document.getElementById('testDiv'); while(a) { if(testDiv.firstChild) { testDiv.removeChild(testDiv.firstChild); } else { a = false; } } for(j=0;j<i;j++) { var textB = document.createElement('input'); textB.name = 'name'+j; textB.type = 'text'; testDiv.appendChild(textB); } } </script> </head> <body> <pre> <form name = "reservation" method = "post" action = "reservation.php"> <b>Date of Travel <input type = "text" name = "date"> // I want to change it to drop down but follows the 31 30 28 days in calendar depends on month Destination <input type = "text" name = "destination" >//drop down also for the destinations Time <input type = "text" name = "time"> // i want to put a drop down here depends on destination because every trip has its own time of trip Class <input type = "text" name = "service">//drop down for ordinary or aircon Number of passenger/s <input type = "text" name = "passenger" onChange = "passengersname(this)"> Name/s <div id = "testDiv"></div> // for the names also i want to break it so that it will goes down Available Seats //a check box will be shown in here based on the database for what are the available seats. </b> <input type= "submit" value = "submit"><input type= "reset" value = "cancel"> </form> DESTINATIONS * Manila - Daet - Manila * Manila - Naga/Iriga - Manila * Manila - Legaspi - Manila * Manila - Sorsogon - Manila * Manila - Panay - Manila * Manila - Samar/Leyte - Manila * Manila - Mindanao - Manila * Manila - Clark - Manila </pre> </body> </html>
<input type = "text" name = "date"> // I want to change it to drop down but follows the 31 30 28 days in calendar depends on month - magbabase ang paglimit mo ng end ng days ni2 sa calendar sa mysql timestamp. refer po kayo sa mysql timestamps kung pano makuha yung days of the year. Destination <input type = "text" name = "destination" >//drop down also for the destinations - this is either database driven or html hard coded Time <input type = "text" name = "time"> // i want to put a drop down here depends on destination because every trip has its own time of trip - kung yung time ng trip po ay nakabase sa destination meaning they are categorized, nasa database din po ang sagot nito. Class <input type = "text" name = "service">//drop down for ordinary or aircon - try nyo 2 <select name="type"> <option>1</option> <option>2</option> </select> Number of passenger/s <input type = "text" name = "passenger" onChange = "passengersname(this)"> Name/s <div id = "testDiv"></div> // for the names also i want to break it so that it will goes down Available Seats //a check box will be shown in here based on the database for what are the available seats.