CS4025/CS6095 Assignment 9

 

Due: Apr. 20, 2008

 

This is a bonus assignment. 5% weight will be added to your total final score of the course.

 

Create a web page with form to let a user to enter her/his personal information, including first and last names, address, and phone number. The address part includes street number and name, city name, province/state name, and country name. The city, province/state, and country names should be selected from drop-down menus. The user selects her/his country name from the country list menu.  Then the province/state list menu can only contain the names of the provinces/states of the selected country. Similarly, the city list menu can only contain the names of cities of the selected province/state.

 

On the server side, you need to create the following database tables:

§       UserInfo table contains records of user personal information.

§       One or more table that contains information of country names, province/state names, and city names.

 

You need to use AJAX to implement the web page/form as follows. When the page is first generated from the server side, the names in the country list menu are retrieved from the database, but not for the province/state list and city list. On the client side, when the user selects a country from the country list menu, a JavaScript function will use AJAX to retrieve the names of the provinces of the selected country from the database in the server side, and set up the names in the province/state list menu. The similar actions should be applied for setting up the city list menu.

 

On the server side, you can use two web applications in Perl or PHP to support the above AJAX operations.

 

You should test at least 3 country names, 5 province/state names for each country, and 5 city names for each province/state.

 

To test and submit, put all your files in  your-login-id/public_html/a9” directory on isel.cs.unb.ca server with the entry web page name “home.php” or “home.pl”.