Jump to content


Photo

form


  • Please log in to reply
2 replies to this topic

#1 somo

somo
  • Members
  • PipPipPip
  • Advanced Member
  • 31 posts

Posted 17 July 2006 - 11:27 AM

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.

<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>&nbsp;</p>		</td>
		</tr>
	</table>	</td>


#2 sanfly

sanfly
  • Members
  • PipPipPip
  • Advanced Member
  • 344 posts
  • LocationNew Zealand

Posted 17 July 2006 - 11:35 AM

You have additional form tags in there

<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>&nbsp;</p> </td>
</tr>
</table> </td>


If you're not part of the solution, you're part of the precipitate

#3 somo

somo
  • Members
  • PipPipPip
  • Advanced Member
  • 31 posts

Posted 17 July 2006 - 11:39 AM

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! :)

You have additional form tags in there

<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>&nbsp;</p> </td>
</tr>
</table> </td>






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users