Simple form with drop down and MySQl Insertion

Giarc86

Expert Member
Joined
May 28, 2008
Messages
1,243
Reaction score
4
A friend and I are designing a web app for his company. The user will be able to select an option from a drop down and then a second drop down must populate with subcategories of the first drop down. Then once the form is completed it must be inserted into a MySQL database.

Now the thing I just want to make sure of is, can I do this all in PHP and MySQL?
I know a bit of PHP and have done simple data insertion from a form.

I just want to find out if there is something easier or better to use, or if PHP is perfect?

Thanks
 
Last edited:
If you want the second drop-down to populate automatically when the first drop-down changes without reloading the entire page, then you'll have to throw in some client-side scripting as well.

Otherwise, PHP is fine, well documented with billions of examples.
MySQL is easy enough to use, but it can be tricky setting it up.
 
Thanks for the help guys. I am using PHP and MySQL and have quite a bit done so far.
I am having a bit of trouble with the drop downs though. There are three drop downs, the first drop down will populate the other two drop downs with the relevant data from the SQL database.

I found a good example to do it regarding two drop downs and populating from the database without reloading the entire page. The problem is, it works fine on Localhost, as soon as I upload it to my web server it doesn't work. It is an Ajax script so I have no idea how it works. I also am not sure how to go about populating the two drop downs from the first one.

I have Googled but can't find anything exactly helpful. Does anyone have any advice or sites that could assist me?

Thanks
 
Top
Sign up to the MyBroadband newsletter
X