jeger003 Posted August 23, 2010 Share Posted August 23, 2010 hello, im trying to have a from do a GET on the same page as it was submitted the url is like this mysite.com/index.php?a=34&b=22 the form action="" is left blank but it doesn't display a=34b=22 it only displays index.php?informaitonfromform which ends up sending the user to the index page and away from the index.php?a=34&b=22 <table width="287" border="1"> <tr> <td width="277"><form id="form1" name="form1" method="GET" action=""> <label>Zipcode: <input type="text" name="zipcode" id="zipcode" /> </label> <input type="submit" name="submit" id="submit" value="Submit" /> </form> </td> </tr> </table> how do i make the submitted form display on this page index.php?a=34&b=22? Quote Link to comment Share on other sites More sharing options...
Ayon Posted August 23, 2010 Share Posted August 23, 2010 change this action="" to this: action="<?php echo end(explode("/",$_SERVER['REQUEST_URI'])); ?>" Quote Link to comment Share on other sites More sharing options...
jeger003 Posted August 23, 2010 Author Share Posted August 23, 2010 It didn't work. it continues to forwards me to index.php I'm trying to figure out another way. is there a javascript that can display a textbox when a link is clicked? like my users are sent a page with all the US states and then they click their states and are forwarded to zipcode. i want a textbox to show under the state and they can enter the zipcode that way i can get both state and zipcode in one form Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.