Question: In this section youll create a table in a database, connect to that database from your website, and print the information out from a table
In this section youll create a table in a database, connect to that database from your website, and print the information out from a table you created. DO NOT CREATE A NEW DATABASE. ONLY CREATE A TABLE IN THE csc412 DATABASE.
Add a Table Using PHPMyAdmin MySQL comes standard with a command-line interface that, for the most experienced user, can be almost useful. There is a commonly used web interface named phpmyadmin that significantly simplifies the most commonly used MySQL.
A practice database has been set up for this class on the setapproject.org site. All students in the 412 classes share this database, which is named csc412. Your task is to create a table and populate it with some sample data; the specifics of the table structure and contents are left to you. To access the database, browse to http://setapproject.org/phpmyadmin. The username and password are csc412. Login and browse around. Using phpmyadmin, create a table and populate it with some data.
Connect to your database using a PHP script, write a PHP script to connect to the csc412 database, select all the records from the table you created, and print the rows of the database to the web page. The location of the database is setapproject.org. The name of the database is csc412. The password for the database is csc412. The table name (used in the SELECT statement) is the table you created. If you get stuck, an example file has been created for you and is available from your Amazon-AWS shell account at /home/csc412/db.php. You can see how it operates by browsing to http://csc412sfsu.com/~csc412/db.php.
11.4 Create A Visitor Page
11.4.1 Basic MySQL Now that you know how to use MySQL and PHP, create a visitor page that asks the visitor to enter a quote and to whom it is attributed. In your PHP processing script, write this information to a table that you create in the database. In your PHP response page, list all of the quotes that have been entered.
11.4.2 Advanced MySQL In addition to the visitor log from above, in the response page, allow the user to search for a string of the quotations. First, create an additional response page. Once youve got this working, try seeing if you can use AJAX to update a table on your page without having to go to a new page. jQuery is very helpful with AJAX
Please help with coding for 11.4, 11.4.1 and 11.4.2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
