Results 1 to 2 of 2

Thread: Display data in a text box depending on drop box selection

  1. #1
    Join Date
    Jan 2008
    Location
    New Zealand
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Red face Display data in a text box depending on drop box selection

    Hi all, I'm needing to be pointed in the right direction as I'm not sure where I should be looking... (JavaScript? XML? anything else...)

    I am setting up online ordering for business cards for a client with a database with approx 100 names, addresses etc. The idea is that each individual can order their cards over the net as they are required.

    The ability to review the current details for each card is required (just in case they change phone numbers or add some degrees to their profiles) before submitting the order.

    The order form is to have a drop box to display each name but I'm not sure how to get the browser to display the rest of the details in a text box dependant on the selected name.

    I'm sure I should be able to figure this out but the little grey cells have aged considerably in the last 8 years and the more I read the more befuddled I am becoming!

    I'd be grateful for any suggestions.

    Cheers! G

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Try this:
    Code:
    <?php
    ///////////////////////////////////////////////////////////////////////
    ///All your data including the connection to the db and host////
    //////////////////////////////////////////////////////////////////////
    $query = mysql_query("SELECT * FROM ?? ORDER BY ??");
    while($text = mysql_fetch_array($query)){
    echo '<textarea>'.$row['??'].'</textarea>';
    }
    Just fill in alll the blanks and that should work.
    Jeremy | jfein.net

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
  •