Jump to content

php postback


bouwob

Recommended Posts

From what I have been reding I see there is no equilivent in php. Somebody talked about needing a framework tool to do something like this but that sounds like it would be alot more trouble than its worth.

 

What I need

 

Year, make, model

 

year as a form select that when changed will query the db to grab all the possable makes for that year. so on and so forth.

 

What is the php magic to achive this. Only need the postback part. Everything else I can hopefully figure out for myself.

 

tia 

Link to comment
https://forums.phpfreaks.com/topic/40292-php-postback/
Share on other sites

A simple way I do this, keeping in mind I have never looked at AJAX yet, is to have your select box

<select name="mySelect" onChange="location.href='".$_SERVER['PHP_SELF']."?mySelect='.this.selectedIndex.value;">

 

Then just have something grab your $_GET['mySelect'], query it in the db and print the results to your next select box :)

Link to comment
https://forums.phpfreaks.com/topic/40292-php-postback/#findComment-194943
Share on other sites

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.