Jump to content

Two dynamic listboxes using AJAX, PHP and MySql updating a textbox


johntigner

Recommended Posts

i'm a newbie with MySql, AJAX and PHP and i need help to guide me in the right direction

 

i need to make a quote form that uses two dropdown listboxes and a text box

to access a database with two tables... table and zonerate. the fields are

 

MySql Database name is web_data containing tables:

 

TABLE ..........id - code - key - text

id should be used as a filter id=ZN

text contains city and zone names

code contains the zone code for that city or zone

ZONERATE.....zone1 - zone2 - price

zone1 and zone2 contain the same code used in the above TABLE.code field

i need to populate both listboxes with zone names from TABLE then

after selecting a zone in LISTBOX1.. the pickup zone ....store the value from code in a variable $pzone and

after selecting a zone in LISTBOX2..the drop off zone ..store the value from code in a variable $dzone?

 

 

from here i need to use Variables $pzone and $dzone to match the vatues in table ZONERATE fields zone1 and zone2 to find the value in field price and if a value exists display it in TEXTBOX

 

 

 

I would be grateful for any and all help

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.