Jump to content

HELP, PHP FORM PROBLEMS


f6100153

Recommended Posts

I have a form that looks like this:

 

<form  method="get">

Postcode:<input name="Postcode" type="text"><br>
Name:<input name="Name" type="text"><br>
<a href="#" onclick="popup('popUpDiv')">Find Agent</a>
<input name="ID" type="hidden">
<input name="Employee_Name" type="hidden">
<input name="Submit" type="submit">

</form>

 

The pop up Div has a Mysql query thats search for available agents that cover the postcode entered in postcode textarea, at the moment the only way I can get this work is by having another submit button which submits the postcode and to the same page.

 

Is there a way use what is entered in the postcode textarea as a php variable without doing a page submit first??

 

Thanks in advance

 

Tom

 

Link to comment
https://forums.phpfreaks.com/topic/228095-help-php-form-problems/
Share on other sites

The easiest, most straightforward way to do it would be by using jQuery.  Otherwise you have to go through all the hoops of doing all the tedious low-level work yourself.

 

That said, it is a good idea to see exactly how it works under the hood, even if you're not going to go that route.  So, look at jQuery first to see how easy it can be, and then look up a tutorial on Ajax and JSON for the details.

 

Google will provide all of what you need if you search.

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.