1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Pass A Subid Into A Hidden Form Field

Discussion in 'General Scripting Chat' started by black_ice007, Feb 9, 2010.

  1. black_ice007

    black_ice007 Regular Member

    Joined:
    Nov 28, 2007
    Messages:
    351
    Likes Received:
    141
    Occupation:
    Software Engineer
    Location:
    Raleigh, NC
    I have a domain that is being hosted on Godaddy.com. I'm having a problem where I need to pass the value of various subid variables listed on a URL into a hidden field on a form. This form will be submitted to another page where all variables will be parsed.

    Here is an example of what I'm looking for.

    http://www.domain.com/index.php?subid=12345&subid2=67890

    These subids will need to populate a form that looks like this:

    Code:
    <form action="results.php" id="autoForm" method="get">
    						<div style="display:none">
    							<input type="hidden" id="subid" name="subid" value="" />
    
    							<input type="hidden" id="subid2" name="subid2" value="" />
    
    						</div>
    						<div id="form">
    							<label for="zipcode" id="label">Zip Code:</label>
    							<input type="text" name="zipcode" id="zipcode" MAXLENGTH="5"/>
    						</div>
    					</form>
    
    
    What I need is for when someone lands on my page, the "value" for those hidden fields should show up and be set.

    The requirement is that this must be made to work on my current hosting account which is on Godaddy.com
     
    Last edited: Feb 9, 2010
  2. black_ice007

    black_ice007 Regular Member

    Joined:
    Nov 28, 2007
    Messages:
    351
    Likes Received:
    141
    Occupation:
    Software Engineer
    Location:
    Raleigh, NC
    Solution resolved: