[RESOLVED] Form action
Results 1 to 5 of 5

Thread: [RESOLVED] Form action

  1. #1
    Junior Member
    Join Date
    Jun 2013
    Posts
    4

    resolved [RESOLVED] Form action

    Hello everyone.
    I'm trying to change the url after submiting a form with the following code:

    HTML Code:
    <form name="searchSpikes" action="?a=findspikes2" method="post">
    		<select name="brand">
    			<option value="Nike">Nike</option>
    			<option value="Adidas">Adidas</option>
    		</select>&nbsp;&nbsp;
    		<input type="textbox" name="maxprice" style="width:30px;">‎&#8362 &nbsp;&nbsp;
    		<select name="size">
    			<option value="35.0" selected="selected">35.0</option>
    			<option value="35.5">35.5</option>
    		</select>&nbsp;&nbsp;
    		<select name="size">
    			<option value="48.5">48.5</option>
    			<option value="49.0" selected="selected">49.0</option>
    		</select>&nbsp;&nbsp;
    		<input type="button" name="find" >
    	</form>
    The url before I submit the form is: xxxxxx.com/folder/?a=findspikes and when I submit the form the url stays the same.
    Why it's not changed to ?a=findspikes2 ??
    Last edited by bradgrafelman; 06-18-2013 at 12:48 PM. Reason: bbcode tags modified

  2. #2
    Pna lbh ernq guvf¿
    Join Date
    Jul 2004
    Location
    Kansas City area
    Posts
    19,410
    Thread moved to ClientSide Technologies forum (since this has nothing to do with PHP).

    How are you submitting the form? It worked fine for me if I press return inside one of the text fields or if I change the input type of "find" to be "submit."

  3. #3
    Junior Member
    Join Date
    Jun 2013
    Posts
    4
    Well i click the submit button and the url stays the same, just to make sure.. When you click the button your url is changed?

  4. #4
    Pna lbh ernq guvf¿
    Join Date
    Jul 2004
    Location
    Kansas City area
    Posts
    19,410
    Quote Originally Posted by tnrh1 View Post
    When you click the button your url is changed?
    Only if I change it to actually be a submit button. Your example HTML code snippet above does not contain a submit button.

  5. #5
    Junior Member
    Join Date
    Jun 2013
    Posts
    4
    Oh thank you so much!!! case solved!

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
  •