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 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Mar 2004
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    I am trying to put a select boX on my data entry form?

    My data entry form stores data in the (dataentry_tbl) and the select box would grab data from a table (assign_tbl). I have the data entry form done and it works but I am confused on how to make another connection for the select box.

    Can someone give me an example of how I can do this?

  • #2
    Regular Coder
    Join Date
    Mar 2004
    Posts
    115
    Thanks
    0
    Thanked 0 Times in 0 Posts
    not sure what your asking post some code

    what fields are in your table etc
    do you just want to grab data from mysql table assign_tbl
    and put it in a select box on form page

    the more info you can supply the more we can help

  • #3
    New to the CF scene
    Join Date
    Mar 2004
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Yes , exactly what you said.

    just grab data from mysql table assign_tbl
    and put it in a select box on form page.

  • #4
    Regular Coder
    Join Date
    Mar 2004
    Posts
    115
    Thanks
    0
    Thanked 0 Times in 0 Posts
    somthing like this


    PHP Code:
      <select name="To" size="5">
    <?php
    $c
    =mysql_query("SELECT * FROM assign_tbl ORDER BY id");
    while(
    $t=mysql_fetch_array($c))
    {
    echo 
    "<option value=\"$t['fieldname']\">$t['fieldname']</option>\n";?>
    }
    ?>
    </select>

  • #5
    New to the CF scene
    Join Date
    Mar 2004
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thanks!!!!!!!!!!!

    Thats what I needed, now I can play around with this to make it work for me.


  •  

    Posting Permissions

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