How to make a dynamic table in PHP?

How do i use PHP to make dynamic entries in a mysql table?

  • 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?

  • Answer:

    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/

user1299028 at Stack Overflow Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.