Author Topic: PHP & MySQL Form Display  (Read 253 times)

0 Members and 1 Guest are viewing this topic.

Offline mfkamandeTopic starter

  • Irregular
    • View Profile
PHP & MySQL Form Display
« on: March 03, 2010, 05:16:02 AM »

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?

Offline yozyk

  • Irregular
  • Gender: Male
    • View Profile
Re: PHP & MySQL Form Display
« Reply #1 on: March 03, 2010, 10:55:07 AM »
You need to use javascipt .
I am learning PHP and English simultaneously

Offline prashanth

  • Irregular
  • Gender: Male
    • View Profile
Re: PHP & MySQL Form Display
« Reply #2 on: March 11, 2010, 02:06:18 AM »
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.

 





Offline prashanth

  • Irregular
  • Gender: Male
    • View Profile
Re: PHP & MySQL Form Display
« Reply #3 on: March 15, 2010, 05:27:03 AM »

PHP Freaks Forums

« on: »

Tired of these ads? Purchase a supporter subscription to get rid of them.