MPCS 53001: Assignment 8

Project is due by noon on Monday, December 2, 2013


Web interface to your TBP app

The seventh part of your TBP project is to create a web interface to your database using the php programming language and a web server.

First, you will need to request an account on the CS CGI server. Then you should create a directory named cs53001 in your
/stage/cgi-cspp/<your_username>/public_html directory.

Next, you will create a web page that will be the (temporary) interface to your TBP. This web page should consist of links and forms and short explanations for any complex functions that implement the functionality needed by your TBP app. The functions and their parameters will depend on your schema and application scenario but you should certainly include functions that display users and tweets based on some conditions.

Every link and form on this web page should correspond to (and implement) a particular functionality of your TBP app. For this assignment, you will only need to implement 8-10 functions. You don't have to implement any functions that modify your database such as registering a new user or sending a tweet - you will get to do that in the last part of your TBP app.

Here is an example of a web page, tbp.html, that has a link to a php script list_tables.php and a form that runs list_attrs.php. Note that the names of the files have an extra .txt extension so the source code can be viewed in your browser. The second php file assumes that you have a table Users with several attributes.

For a quick primer on HTML forms you can go to http://www.w3schools.com/html/html_forms.asp. For more information on how to handle form variables passed to php refer to this section of the php manual http://us3.php.net/manual/en/language.variables.external.php. For more information on accessing MySQL from php read http://us3.php.net/manual/en/book.mysqli.php.

Your web page that contains all links and forms should be named tbp.html and should be placed in your
/stage/cgi-cspp/<your_username>/public_html/cs53001/ directory (e.g. /stage/cgi-cspp/evtimov/public_html/cs53001/) . Make sure that this page is viewable by a browser. The url that can be viewed by a browser is:
http://cgi-cspp.cs.uchicago.edu/~<your_username>/cs53001/tbp.html.

While you don't need to submit your php code for this assignment, you still need to create a directory hw8 in your svn repository and add a file tbp.txt that contains the link to your web interface. Of course, you can also use this directory to keep track of your php files and share them with the TAs and the instructor if you need any help with getting your web interface to work. The instructions on how to submit your work can be found here.


There is no Gradiance problem set for this assignment