Database creation:

Create the database:

1) Log into hosting account

2) Create MySQL database:

Be sure to look up Boyce Codd Normal Form(BCNF) to ensure your database is in normal form and maintains it's functional dependencies.

3) Log into database using phpMyAdmin

4) Add tables to database:


Add source files to hosted account:

1) Log into hosted account using Filezilla or another file transfer program

2) Upload scripts created in second column of page.

3) Check that it works in all your browsers, and you're done!



                                                               

Create you're connection.php file:

Open an editor(notepad++/BBEdit) and add this code filling in fields listed:

				
<?php

   //connect To Database
   $hostname="YOURHOSTNAME";
   $username="YOUR MYSQL DB USERNAME(not your hosting username)";
   $password="YOURPASSWORD";
   $dbname="YOURDATABASENAME";
   $dbc = mysql_connect($hostname,$username, $password, $dbname) or die ("<html><script language='JavaScript'>alert('Unable to connect to database! Please try again later.'),history.go(-1)</script></html>");

?>
					

1) Fill in YOURHOSTNAME (This should be provided by your ISP and may be customized for their systems if you're not hosting the page on your own hosting server.)

2) Fill in YOUR MYSQL DB USERNAME (This was set up in step 2 on the fist column.)

3) Fill in YOURPASSWORD (This was set up in step 2 on the fist column.)

4) Fill in YOURDATABASENAME (This was set up in step 2 on the fist column.)


Include connection.php script on the web page you would like to access the database with like this:

<?php

   //database connection
   require_once('connection.php');
   mysql_select_db("YOURDATABASENAME", $dbc);

   //code to access your database values
   $query = "SELECT  `YOURVALUE` FROM `YOURTABLE` WHERE YOURVALUE =  CONDITIONS"; 
   $result = mysql_query($query) or die(mysql_error());
   $row = mysql_fetch_array($result);
   $quizID = $row['YOURVALUE'];	
   
?>
					

1) Fill in YOURDATABASENAME, YOURVALUE, YOURTABLE.

2) Use the values from your results in your new page!

3) Upload to your domain and

TEST IN ALL BROWSERS!