Jump to content

form


somo

Recommended Posts

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>&nbsp;</p> </td>
</tr>
</table> </td>[/code]
Link to comment
Share on other sites

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>&nbsp;</p> </td>
</tr>
</table> </td>[/quote]
Link to comment
Share on other sites

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>&nbsp;</p> </td>
</tr>
</table> </td>[/quote]
[/quote]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.