WebDevDanno
WebDevDanno

Reputation: 1122

Making dynamic forms work with my back-end database

I'm looking for some advice. I have been given a paper form with various criteria. I need users to be able to select a type of transport (Bus, Train, Taxi, Tram, Other).

Upon the selection, I need more fields to be produced in a form based on the user's choice. So questions about Bus times would be produced if the user selected bus.

The fields will be generated using PHP and MySQL. I have seen some JQuery solutions but I'm a little confused as to what my approach should be.

Can I use JQuery, PHP and MySQL together or can my problem just be achieved using just PHP and MySQL. Please note, the fields will be stored in my MySQL database already, I just them to be generated after the selection from the dropdown menu has been displayed.

No source code sorry everyone as I'm just asking about the approach I should take. I hope I've provided enough detail!

Upvotes: 0

Views: 236

Answers (2)

Ricky
Ricky

Reputation: 373

i think,

actually you can achieve this by only using php and mysql, jquery makes you easier when you play with DOM, with out it you can achive that goal, but need extra work with native javascript.

CMIIW

Upvotes: 0

skos
skos

Reputation: 4212

There is no way to achieve this solution with just PHP & MySQL. You would need to Ajax/JQuery to achieve this. Based on user's selection you need to send the data to server using JQuery Ajax and then server will send back the response that you need to show to the user.

This link should help you.

Upvotes: 1

Related Questions