I got the dynamic drop down list to work but i do not know how to submit those values into another table in database. Basically the scenario is, I want the user to select values from the drop down list and when he clicks submit button, the values will be stored in another table (called booking) in the mysql database.
Any ideas?

The 2 current tables i got that goes with the scripts below are:
Countries and Cities

Ok, first you want to stop using the mysql_ functions, they're slower, and less secure than any of the alternatives. PDO has become the standard I believe, and it's very simple to implement either procedurally or using objects.

Now back to the advice you actually asked for. It will be hard to give you a working fix without knowing anything about your schema (aka table structure) but here is a short PDO Object based example of grabbing values from one table and inserting into another. I've bypassed the form completely, and just pulled all active foo fields from table bar, and then used a prepared statement to add each into new_table with a timestamp.

You can. It is no tougher than the way you're currently trying to access the database, except it's more secure, and much faster. And you have all of us here to help with any issues you run into. You're always more likely to get help when you're trying to do things the right way. How likely would you be to help someone trying to put square tires onto their car?

OK ....I have just seen the tutorial, it only shows how to put values into the database from the script end.

What i am trying to do is grab data from 1 table in the database and put them in dynamic drop down lists on the web form, then when the user picks those drop down lists on the web form and click submit button, those values then gets inserted into a different table in the database

Im in the military, we can put square tires on any vehicle as long as we escape an ambush! :-)

Sorry but i am told to do a project on coach tours in europe using wamp and phpmyadmin. I only learnt web design in a week taught by military instructors. I am completely new to all this and I am in desperate help because i spent almost 3 weeks teaching my self how to do coding and running out of time. Project due soon.

I got my customer registration form working where a customer registers with a user name and password, then logs into the site where he/she can book a tour. Now the problem i got is the booking form. I can submit values into my booking table by using <option></option> method but this only allows me to put the values in hardcoding (inside the booking.php).

My project requires that the tour agency is able to update the webpage with forthcoming tours, which i managed to do. This is inserted into the tour table in the database.

The booking form should be able to pull the forthcoming tours from the tour table and list it in the booking form for the customer to select.

When a customer clicks the submit button in the booking form, those selected tours is then sent to another table in the database for the tour agency to view to see what tours have been booked for.

Sorry that i didn't explain it better earlier in the post. To be honest i still find it hard to understand alot of these scripts based on tutorials reference this problem i have. Is there a easier and better way to do this?

There's always an easier and/or better way to do things. The beauty of programming in any language is that for any problem you encounter there are a number of ways to solve it. With practice your solutions become better as you understand the finer points more and more. Show me your code for your form, and I'll show you how to update it.

***edit***
Sorry I see now that you did put up your form. give me a minute and I'll have some code for you.

it's alright; do you have to use Ajax though? personally I try to avoid client side scripting just because of security and the possibility that your visitor may have client side scripting disabled which would break the functionality.

Here's a little code, i couldn't test because i haven't setup a database with those tables, but it should work for you with very little modification. It is a page that displays a form, and processes the form itself. on submit, it populates the city box based on the cities in posted country. countries are populated every time, and the selected country should remain after post. in theory, selecting a country should submit the form (that part may require another look because of the way it's quoted) and then the form when re-drawn will include cities for the selected country. give it a try and let me know if you have questions or errors you can't resolve.

alright; made some changes. now the action on the form is dynamic; if $_POST['city'] is set, then the form processes to wherever you want to process the full form. Otherwise it posts back to itself to populate the city list. Along the same lines, the text on the submit button shows 'get cities' or 'submit form' based on the same context.

does the form need a submit button for the user to click when he/she finish selecting the values.
And the values selected has to go in a new table, right?

I was trying to have it submit the form automatically on change to country, which i suspected may not work because of the way that it was quoted. rather than mess with that to make it work with JS, i just added a dynamic submit in the example above.