I’m sorry, i Know this must be a basic question, but i cant find the answer in my textbook- i guess i’m not looking in the right places.
If i have a mysql database that keeps track of members and new pages created by members, what php script do i use to append my mysql database dynamically so that the new entries are listed accordingly?
In order to update a database using PHP you need to connect to the database then issue a SQL statement – in your case most likely an INSERT statement which inserts a new row or rows.
There are 2 main ways to do this in PHP – using the built in mysql functions such as mysql_connect and mysql_query, or using the PDO library.
An example of using the native mysql functions can be found here: http://www.tizag.com/mysqlTutorial/mysqlinsert.php
An overview of PDO (and why it’s a preferred solution over the native mysql functions) can be found here: http://net.tutsplus.com/tutorials/php/why-you-should-be-using-phps-pdo-for-database-access/