Jump to content

PHP & MySQL Form Display


mfkamande

Recommended Posts

 

I am new to Web development. Am using PHP and My SQL Database. I am developing a transport management system. To manage users for the system, I have a combobox (select) which lists the user codes. I have a text box input which I want to display the name (other details from the database) every time the selection changes before submitting the form. How do I achieve this?

 

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/193978-php-mysql-form-display/
Share on other sites

Hi

we can achieve this by using AJAX.

 

Here is the flow

----------------------

when you change the option in the select box call the javascript function.

you need to build the javascript function which will request to the php file.

php file should take the id and perform the database operations and echo the name.

 

in javascript you will get the response and that response you can assign to the textbox.

 

you try in this way and just search in the net you will get lot of scripts.

 

still if you are not clear how to do let me know with your requirements,i will give the code to you.

 

 

 

 

 

 

 

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.