www.webdeveloper.com
Results 1 to 4 of 4

Thread: dynamic selection

  1. #1
    Join Date
    Mar 2006
    Location
    Canada
    Posts
    1,197

    dynamic selection

    Hi below is a select menu that I want to set so that when a person selects the value "home then the cell next to it will echo $_session['home_phone'], if the value cell is selected then echo $_session['cell_phone'] if the value work is slected then I want to echo $_session['work_phone']. if all is selected then echo all three sessions.

    I want this to be done after the selection is made not after a button is clicked

    any help is execellent

    PHP Code:
     <td class="left"><select name="select3">
                      <
    option value="home">Home Phone</option>
                      <
    option value="cell">Cell Phone</option>
                      <
    option value="work">Work Phone</option>
                      <
    option value="all">All Phone</option>
                    </
    select>
                    </
    td>
    <
    td>session Value </td
    Kevin

  2. #2
    Join Date
    Dec 2006
    Location
    Escaz˙ (Costa Rica) and Mallorca (Spain)
    Posts
    3,234
    Where? In the same script?

    I think you'll need javascript for that and you'll have to preload javascript variables (array) with the value of existing PHP session variables.

    Then, using onchange, you can then alter the display.

  3. #3
    Join Date
    Mar 2006
    Location
    Canada
    Posts
    1,197
    I guess I should move this post to javascript
    Kevin

  4. #4
    Join Date
    Mar 2006
    Location
    Canada
    Posts
    1,197
    I guess I should move this post to javascript
    Kevin

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles