#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    3
    Rep Power
    0
    I have a drop down box populated with names of towns from my db (MySQL) all that is working fine.

    My problem is I do not know how I select a town in the box and have it take me to that web page on my site, can you help me please, by the way this is in PHP3 my server has not up graded to 4 yet
  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15

    you can try something like..
    html
    ----
    <form action="redirect.php3" method="post">
    <select name="filename">
    <option value="index.htm">home</option>
    <option value="second.htm">secondpage</option>
    <option value="third.htm">Thirdpage</option>
    </select>
    </form>

    redirect.php3
    -------------
    <?php
    header("Location: $filename");
    ?>

    the above line redirect the page to your web page which user wants to visit.

    .....................


    or you can try this in javascript very easily.

    see an example here:
    http://www.iris.dti.ne.jp/~times/jun/java/menu.htm


    ------------------
    SR -
    webshiju.com
    www.jobxyz.com-IT Career Portal
    ezipindia.com--WebStudio


    "The fear of the LORD is the beginning of knowledge..."

Similar Threads

  1. displaying arrays in a drop down box
    By LOD_Dave in forum PHP Development
    Replies: 4
    Last Post: February 11th, 2004, 05:05 PM
  2. MySQL output to table using phpBB
    By CCCMTech in forum PHP Development
    Replies: 0
    Last Post: February 2nd, 2004, 03:43 PM
  3. retrieving data from a drop down box for modifying
    By swordfishy in forum PHP Development
    Replies: 0
    Last Post: January 18th, 2004, 09:07 PM
  4. Easy! - Simple drop down box
    By JBW in forum HTML Programming
    Replies: 4
    Last Post: November 19th, 2003, 06:57 AM
  5. changing the buttons in the message box
    By crackerweb in forum Visual Basic Programming
    Replies: 6
    Last Post: October 23rd, 2003, 07:36 PM

IMN logo majestic logo threadwatch logo seochat tools logo