SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    Get my greedy down dotJoon's Avatar
    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
    The above code is supposed to move to insert.php if a user click the submission button.

    But there is no move when I click the button.

    would you help me?

  2. #2
    pie??? PIE!!!! rsdl's Avatar
    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"

  3. #3
    Get my greedy down dotJoon's Avatar
    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.

  4. #4
    SitePoint Zealot
    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 ?>
    OR

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •