Jump to content

need help with php and html form


jeger003

Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/211539-need-help-with-php-and-html-form/
Share on other sites

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.