somo Posted July 17, 2006 Share Posted July 17, 2006 Hi i know this sin't strictly php but its being used with bits of php code but i cant figue out why the form in this code won't submit, when i go to press the submit button it does nothing, ive been looking at it for ages and i cant find the cause of the error.thanks.[code] <td valign="top" class="bodyText"><table><?PHP displayLogin(); ?><form name="formcheck" onsubmit="return formCheck(this);" method="POST" action="details.php"><p>Please supply your booking details in the fields below</p><tr><td>Room Type: </td><form><td><select name="R_ID"> <option value="1">Double <option value="2">Single <option value="3">Twin <option value="4">Accessible Room</td></select></form></tr><tr><td>Arrival Date: </td><td><input id='date1' type="text" name="arrive" onclick="scwShow(document.getElementById('date1'),this);" /></td></tr><tr><td>Departure Date: </td><td><input id='date2' name="depart" onclick="scwShow(document.getElementById('date2'),this);" /></td></tr><tr><td>Number of Rooms: </td><td><select name="no_of_rooms"> <option value="1">1 <option value="2">2 <option value="3">3 <option value="4">4 <option value="4">5 <option value="4">6 <option value="4">7 <option value="4">8 <option value="4">9 <option value="4">10 </td></select></tr><tr><td>Number of Adults <i>(per room)</i>: </td><td><select name="adults"> <option value="1">1 <option value="2">2 </td></select></tr><tr><td>Number of Children <i>(per room)</i>: </td><td><select name="childs"> <option value="0">0 <option value="1">1 <option value="2">2 </td></select></tr><tr><td><br /><input type="submit" value="Submit" ></td><td><br /><input type="reset"></td></tr></form></table><?PHP }else{ echo "<p>Sorry user does not exist please go back </p>"; } ?> <p> </p> </td> </tr> </table> </td>[/code] Link to comment https://forums.phpfreaks.com/topic/14831-form/ Share on other sites More sharing options...
sanfly Posted July 17, 2006 Share Posted July 17, 2006 You have additional form tags in there[quote]<td valign="top" class="bodyText"><table><?PHP displayLogin(); ?><form name="formcheck" onsubmit="return formCheck(this);" method="POST" action="details.php"><p>Please supply your booking details in the fields below</p><tr><td>Room Type: </td>[color=red]<form>[/color]<td><select name="R_ID"> <option value="1">Double <option value="2">Single <option value="3">Twin <option value="4">Accessible Room</td></select>[color=red]</form>[/color]</tr><tr><td>Arrival Date: </td><td><input id='date1' type="text" name="arrive" onclick="scwShow(document.getElementById('date1'),this);" /></td></tr><tr><td>Departure Date: </td><td><input id='date2' name="depart" onclick="scwShow(document.getElementById('date2'),this);" /></td></tr><tr><td>Number of Rooms: </td><td><select name="no_of_rooms"> <option value="1">1 <option value="2">2 <option value="3">3 <option value="4">4 <option value="4">5 <option value="4">6 <option value="4">7 <option value="4">8 <option value="4">9 <option value="4">10 </td></select></tr><tr><td>Number of Adults <i>(per room)</i>: </td><td><select name="adults"> <option value="1">1 <option value="2">2 </td></select></tr><tr><td>Number of Children <i>(per room)</i>: </td><td><select name="childs"> <option value="0">0 <option value="1">1 <option value="2">2 </td></select></tr><tr><td><br /><input type="submit" value="Submit" ></td><td><br /><input type="reset"></td></tr></form></table><?PHP }else{ echo "<p>Sorry user does not exist please go back </p>"; } ?> <p> </p> </td> </tr> </table> </td>[/quote] Link to comment https://forums.phpfreaks.com/topic/14831-form/#findComment-59267 Share on other sites More sharing options...
somo Posted July 17, 2006 Author Share Posted July 17, 2006 Thanks so much for that, i feel like a right tool , it was staring me in the face the whole time and i didnt pick it up. thanks! :)[quote author=sanfly link=topic=100861.msg398523#msg398523 date=1153136147]You have additional form tags in there[quote]<td valign="top" class="bodyText"><table><?PHP displayLogin(); ?><form name="formcheck" onsubmit="return formCheck(this);" method="POST" action="details.php"><p>Please supply your booking details in the fields below</p><tr><td>Room Type: </td>[color=red]<form>[/color]<td><select name="R_ID"> <option value="1">Double <option value="2">Single <option value="3">Twin <option value="4">Accessible Room</td></select>[color=red]</form>[/color]</tr><tr><td>Arrival Date: </td><td><input id='date1' type="text" name="arrive" onclick="scwShow(document.getElementById('date1'),this);" /></td></tr><tr><td>Departure Date: </td><td><input id='date2' name="depart" onclick="scwShow(document.getElementById('date2'),this);" /></td></tr><tr><td>Number of Rooms: </td><td><select name="no_of_rooms"> <option value="1">1 <option value="2">2 <option value="3">3 <option value="4">4 <option value="4">5 <option value="4">6 <option value="4">7 <option value="4">8 <option value="4">9 <option value="4">10 </td></select></tr><tr><td>Number of Adults <i>(per room)</i>: </td><td><select name="adults"> <option value="1">1 <option value="2">2 </td></select></tr><tr><td>Number of Children <i>(per room)</i>: </td><td><select name="childs"> <option value="0">0 <option value="1">1 <option value="2">2 </td></select></tr><tr><td><br /><input type="submit" value="Submit" ></td><td><br /><input type="reset"></td></tr></form></table><?PHP }else{ echo "<p>Sorry user does not exist please go back </p>"; } ?> <p> </p> </td> </tr> </table> </td>[/quote][/quote] Link to comment https://forums.phpfreaks.com/topic/14831-form/#findComment-59269 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.