Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up sample scripts in drop downs and populating text boxes

    Hi guys, can you give me a sample script in populating a text box based on the choices in the drop down menu based in PHP and Mysql. Im researching this for my school project and i really need it very badly. If its okay wth you guys? By the way, cool site . My cousin told me he gets great advices from you guys thats why he recommended me this website. STAY COOL guys...
    Last edited by DigitalDre; 03-17-2005 at 07:13 AM.

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,960
    Thanks
    0
    Thanked 236 Times in 233 Posts
    This is basically how you do it.
    Code:
    <form name="myform">
    <select name="mysel" onchange="this.form.mytext.value=this.options[this.selectedIndex].value">
    <option value="">Please select</option>
    <option value="This is item 1">item 1</option>
    <option value="This is item 2">item 2</option>
    <option value="This is item 3">item 3</option>
    </select>
    <input type="text" name="mytext" />
    </form>


  •  

    Posting Permissions

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