How do I pass a username form variable from a drop down list/menu to another page?

Hi,
I have a login_success.php page that has a drop down list/menu (which lists usernames). I want the user to click on their user name, and when they click the submit button the username information to be passed over to the username.php page which will contain a recordset, sorted by username.
How do I pass the username info from the drop down list/menu to the username.php page?
The drop down menu is connected to a recordset listUsername, I have filtered the recordset with the Form Variable = username, and I have used the POST method to send the username to the page username.php. I'm not sure how to structure the php or which page to place it on.
<form id="form1" name="form1 method="post" action="username.php">
     <label for="username_id">choose username:</label>
     <select name="username_id" id-"username_id">
          <option value="1">username1</option>
          <option value="2">username2</option>
          <option value="3">username3</option>
          <option value="4">username4</option>
     </select>
     <input type="submit" name="send" id="send" value="Submit" />
     <input type="username" type="hidden" id="username" value="<?php echo $row_listUsername['username']; ?>" />
</form>
Could somebody help me please?
Thanks.

I would not post the variable over, In this case I personally would send it through the URL and use the $_GET method to retreve it. For Example.
<html>
     <head>
          <title>Test Page</title>
          <script type="text/javascript">
               function userID(){
                    //var ID = form1.userIDs.selectedIndex;
                    var user = form1.userIDs.options[form1.userIDs.selectedIndex].value;
                    window.location = "test.html?userID=" + user;
          </script>
     </head>
     <body>
          <form id="form1">
               <select name="userIDs" id="userIDs" onchange="userID();">
                    <option>Select a User</option>
                    <option value="1">User 1</option>
                    <option value="2">User 2</option>
                    <option value="3">User 3</option>
                    <option value="4">User 4</option>
               </select>
          </form>
     </body>
</html>
//PAGE TO RETRIEVE THE USERNAME
<?php
if(isset($_GET['userID'])
     $userID = $_GET['userID'];
     echo $userID;
     die;

Similar Messages

  • To pass the selected data to a variable from the drop down list in abap wd

    Hi,
    I have already created a drop down list and populated it with data from table by using the node and linking it with the internal table. Now I need to know which element is selected so based on that I need to perform some function. eg. based on the selected data , i need to populate the next drop down list.
    A demo code will be really helpful.
    Thanks and Regards
    Tenzin

    Hi,
    On selcting the value from the drop down, we have one event ONSELECT.
    Write the code in this event.
    Get the attribute value to lV_xxxxxx using get attribute.
    then using that you can fill the next DDBK attribute.
    method wddoinit .
      data:
            lo_nd_spfli type ref to if_wd_context_node,
            lo_el_spfli type ref to if_wd_context_element,
            ls_spfli type wd_this->element_spfli.
      data:
          lv_carrid LIKE ls_sflight-carrid,
             itab_carrid type wd_this->elements_spfli,
             wa_carrid type wd_this->element_spfli,
             lo_nodeinfo_spfli type ref to if_wd_context_node_info,
             lt_value_set type wdy_key_value_table,
             ls_value_set type wdy_key_value.
      lo_nd_spfli = wd_context->get_child_node( name = wd_this->wdctx_spfli ).
      lo_nodeinfo_spfli = lo_nd_spfli->get_node_info( ).
      select carrid
        from spfli
        into corresponding fields of table itab_carrid.
      if sy-subrc = 0.
        sort itab_carrid by carrid.
        delete adjacent duplicates from itab_carrid comparing carrid.
      endif.
      loop at itab_carrid into wa_carrid.
        ls_value_set-key = wa_carrid-carrid.
        ls_value_set-value = wa_carrid-carrid.
        append ls_value_set to lt_value_set.
      endloop.
      lo_nodeinfo_spfli->set_attribute_value_set( name = 'CARRID'
      value_set = lt_value_set ).
    endmethod.
    in the event of first DDBK, write the select statement wsing where condition of lv_XXX.
    and append the record as above.
    Regards,
    sarath

  • How do I delete an individual web address from the drop-down list of the address bar?

    I'm using FF 36.0.1 for Ubuntu.
    I used to do that with just Delete button in earlier version. Now nor Del, nor Shift\Ctr+Del do not working. Is this a bug?
    Please don't tell me about history in menu. I won't go there every time I need to delete a broken url.

    Note that is this item has a star at the right then it is a bookmark and you would have to remove the bookmark to remove that item permanently.
    *https://support.mozilla.org/kb/Clearing+Location+bar+history
    *https://support.mozilla.org/kb/Cannot+clear+Location+bar+history

  • How do I add State/Province and Country to my drop down list?

    How do I add State/Province and Country to my drop down list?

    Hi Gen,
    My problem is that I'm working with the free version of Form Central - I'm willing to purchase a version.  Earlier in my form I have States as a drop down menu (see below) but can't copy it to make it appear later in the same document. I was trying to avoid recreating the entire form. Any tips on copying or duplicating a field inside a document.
    Best Regards,
    Gina Grant
    ink + thread
    312.970.1106 (p)
    773.435.6474 (f)
    www.inknthread.com
    CPS Vendor #: 98626
    The information contained in this email is confidential, proprietary and may be legally privileged. This email is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, dissemination, or reproduction is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact ink + thread by e-mail ([email protected]) and destroy all copies of this email.

  • Open a new form based on the selection from the drop down list

    Good Morning Everyone,
    Can any one please advise how I can start to build the form that has a drop down list(DDL) to list other forms so the user can select one from the selection of that DDL to open a new form.
    e.g  A form in workspace ES3 with drop down list to list 3 forms: form1, form2, form3. When user select form1 from the DDL, then it will kick off the render servic to launch form1 in workspace ES3.
    Thanks in advance,
    HD

    Hi,
    I'm not surea about the data structure...Are there two ClassNodes, one for "VALVES" and one for "BOLTS"??
    and for scripting it is no good idea if the names of the attributes are value, don't know if this is your naming...
    but to access a node of the DATA view -->
    //var selection --> you have assigned "VALVES"
      var onodeCN =  xfa.resolveNodes("xfa.record.Classification.ClassNode[*].value");
    // get the node with the valves -->
                   for (var i = 0; i < onodeCN.length ; i++) {
                        if ( onodeCN.item(i).value == selection ) {
                                         //get the Leaves of Node VALVES
                                         var onodeVALS = xfa.resolveNodes("xfa.record.Classification.ClassNode[+i+].ClassLeaf[*].value");
                                         for (var j = 0; j < onodeVALS.length ; j++) {
                                           // insert values of Leave to 2nd drop down
                                XXX.addItem(onodeVALS.item(j).value, onodeVALS.item(j).value);
    ??works??
    norbert

  • How to populate data from dynamic drop down list to the text field

    Hi,
    I tried to populate data from dynamic drop down list to city field. I would like to concat data from drop down list.When selecting add button to add the item and select item from drop down list, data should be displayed in the text field. However, Please help. I spent alot of time to make it works I am not successful.
    Please see the link below.
    https://acrobat.com/#d=SCPS0eVi6yz13ENV0cnUdw
    Thanks for your help
    Cindy

    Hi Rosalin,
    Loop the hidden table, get the values and populate drop down in each iteration.
    DropDownList1.addItem("Text","Value");
    You can use one more solution for this scenario. If it is a matter of 2,3 dropdowns, put three dropDowns in the form layout and give seperate static data binding to them. At run time make the dropDowns hide/visible as per the requirement.
    Hope this helps.
    Thanks & Regards,
    Sanoosh

  • When I delete a name from the address book it does not delete it from the drop down name menu when forwarding a message. How do I remove it from the drop down menu?

    When I delete a name from Address Book it is not removed from the name drop down list when forwarding a message. How can I remove it from the drop down list?

    In Mail go to the Window Menu and select Previous Recipients. Deleting entries from there won't delete them from your Address Book.

  • I have Maveriks. I downloaded numerous ACID Fonts and purchased Stuffit as instructed by ACID Fonts in order to use them. However, now I am unable to figure out how to get them into my Font Family drop down list or insert into Pages. PLS HELP!

    I have Maveriks. I downloaded numerous ACID Fonts and purchased Stuffit as instructed by ACID Fonts in order to use them. However, now I am unable to figure out how to get them into my Font Family drop down list or insert into Pages. PLS HELP!

    Hi FancyJean!
    Here is an article for you about using Font Book and installing fonts that you have downloaded:
    Mac Basics: Font Book
    http://support.apple.com/kb/ht2509
    Thanks for being a part of the Apple Support Communities!
    Cheers,
    Braden

  • How to get my usernames to appear from the drop down box then password automatically put in?

    =( ugh...
    I used to have my settings where it remembered my user name from the drop down box - so I would just type the first letter of my user name and a drop down box would appear and I could just click on my user name for that particular site and my password would automatically fill in...
    I changed something the other night and can't remember what the heck I did... now it won't remember ANY user name OR password or like on face book it has my user name and password there automatically when I open up the log in face book page.
    So I would like to know if anyone knows what needs to be clicked and unclicked to make it so:
    I start typing my user name and the drop down box appears with user names and then my password automatically fills.. I DO NOT want all my user names and passwords already IN the forms when I first open the website... but for me to actually type in a letter and then it fills it... like it used to =(
    /cry
    why do I touch stuff?
    Anyway I hope someone can help me because I am going nuts trying to figure it out and think I'm goofing things up even more =/
    I have firefix 3.6.10

    Does this help?
    * http://kb.mozillazine.org/Password_only_filled_after_entering_user_name
    * Make sure that you not run Firefox in (permanent) [[Private Browsing]] mode
    * You enter Private Browsing mode if you select: Tools > Options > Privacy > History: Firefox will: "Never Remember History"
    * To see all History and Cookie settings, choose: Tools > Options > Privacy, choose the setting <b>Firefox will: Use custom settings for history</b>
    * Uncheck: [ ] "Automatically start Firefox in a private browsing session"

  • How can i redirect 5 choice options from a drop down list into 5 separate text fields?

    I have a number of drop down lists which push one of 5 choices to a text field on another page.
    I want to be able to push each choice from one drop down field to a separate field, so that it is not possible to duplicate the drop down choice.
    The resulting page is going to be locked.
    What script do I need to use to send each of the five choices specifically to five separate text fields?
    Thanks for the insight.

    Hi Paul,
    I've had a look at the sample script you posted. I'm not sure how to make it work with the form I'm creating. (I sent it to you earlier.) Would you mind setting one of the fields up on my form so that I can get an idea of how to then push the choices set up on the "visible on screen only" to the textfields which are locked on the visible page? Do i lock the fields in the same way?
    Will I need to create a new script for each of the arrays I'll be creating? for example, myScript1, myScript2, my Script3....
    Why do i need a reset button?
    Nellie

  • How do I delete names from the drop down list when I login to gmail and facebook?

    When I login to gmail and facebook several login names used in the past show up in a drop down list. I want to remove some of these names. How do I do that?

    On Mac you need to use Shift+Delete
    *http://kb.mozillazine.org/Deleting_autocomplete_entries
    *Click the (empty) input field on the web page to open the drop down list
    *Highlight an entry in the drop down list
    *Press the Delete key (on Mac: Shift+Delete) to remove it.
    *Firefox > Preferences > Security: Passwords: "Saved Passwords" > "Show Passwords"
    *https://support.mozilla.com/kb/make-firefox-remember-usernames-and-passwords

  • How do you make the sentences you input in a drop down list wrap to the next line?

    How do you make the sentences that you input in a drop down list to wrap to the next line?

    You can't.
    see this thread for more info:  Can you set drop down list as multi-line???

  • How to set a default value in a Value Help Drop Down List

    Hi,
    I used an age Range field in my adobe form, the control  is a Value Help Drop Down List. i am populating the drop down using following code.
    IWDAttributeInfo ageInfo = wdContext.nodePersonalData().getNodeInfo().getAttribute("CTAgeRange");
         ISimpleTypeModifiable ageType = ageInfo.getModifiableSimpleType();     
         IModifiableSimpleValueSet ageValueSet =  ageType.getSVServices().getModifiableSimpleValueSet();
         ageValueSet.put("1","21-29");
         ageValueSet.put("2","30-34");
         ageValueSet.put("3","35 or Above");
    My requirement is to set a default value e.g. 30-34 in the age range field.
    I want to give input to iform from my Implementation code only.
    Please help.
    Thanks in advance

    hi Ranjan,
    that means you have to set at design time,
    to set default drop down value you will have to set the value for particular attribute (which is linked to the dropdown element) in the context
    like
    wdContext.currentContext<nodeName>Element.set<FieldName>(<default value>)
    This generally done in Initialization method of the controller.

  • How can I add a blank value in a standard drop down list

    Hello,
    I have a requirement to add a blank value into the standard drop down list of for i.e. the search criteria
    "created on" -> (values are: yesterday/today/last week etc).
    The problem is, that this field has always the default value "yesterday" but our customer wants to have a blank field as default.
    Can anybody provide me steps how can I add this blank value ?
    Many thanks in advance

    Hi Bernard,
    thanks for your reply.
    Its for quotation.
    Could you give me still some further detail steps, please ?
    Many thanks
    Andreas

  • Using a iPad.  How do you delete unwanted address from the drop down list.  I typed in a wrong address once, and now it keeps showing up.

    Using a iPad.  How do you delete unwanted address from the mail drop down list.  I typed in a wrong address once, and now it keeps showing up.

    Winfax1-
    Look in your Contacts App and see if the unwanted address is entered there.  If it is, you can delete it there.
    Fred

Maybe you are looking for