![]() |
|
IntroductionThe 3 things we need initially will be:
Create TableFirstly we need to make sure we have a table created on our database: The code above wll create a table on your MySQL Database called "news" with the following fields created:
LoginSo now that we have a table created we need a way to log into the database. This code will create a database connection. Save the file as "site.inc.php" in a directory called "site" OK so now we have a database with a table called news, and a small file which contains the database login information along with the functions to log in and out of the database. The file is very important, because it eliminates the need to write your DB access details accross many files.
Comments:
|
|