SitePoint Sponsor |
|
User Tag List
Results 1 to 4 of 4
Thread: select box moving to insert.php
-
May 19, 2003, 21:55 #1
- Join Date
- Apr 2003
- Location
- daejeon, South Korea
- Posts
- 2,223
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
select box moving to insert.php
PHP Code:<FORM action="insert.php" method="post">
<select name="day">
<option value="Mon">Mon</option>
<option value="Tue">Tue</option>
<option value="Wed">Wed</option>
<option value="Thu">Thu</option>
<option value="Fri">Fri</option>
<option value="Sat">Sat</option>
<option value="Sun">Sun</option>
</select>
<input type=button name=submission value="click">
</FORM>
But there is no move when I click the button.
would you help me?
-
May 19, 2003, 22:03 #2
- Join Date
- May 2001
- Location
- Vancouver, BC Canada
- Posts
- 502
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
What do you mean by there's no move?
did you mean that the variables aren't being passed to insert.php? if so, then you might want to try this above insert.php:
PHP Code:$day = $_POST['day'];
echo"$day";
-
May 19, 2003, 22:49 #3
- Join Date
- Apr 2003
- Location
- daejeon, South Korea
- Posts
- 2,223
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
The page should go to inderst.php if I click the submisiion button.
But although I click the submission button, the page stays in the index.php including the above code.
That is my primary problem.
Being passed the variables is the secondary problem.
-
May 20, 2003, 02:29 #4
- Join Date
- Mar 2002
- Location
- Perth, Australia
- Posts
- 157
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
You only have a generic form button, not a Submit button . You could also set the onClick property of the button to submit the form using Javascript.
PHP Code:<?php ?>
<input type=submit name=submission value="click">
<?php ?>
PHP Code:<?php ?>
<FORM action="insert.php" method="post" NAME="theform">
<input type=button name=submission value="click" onClick="document.theform.submit();">
<?php ?>Paul Davey
webmaster for Whitford Church of Christ
Bookmarks