| PHP Database Integration With MySQL |
|
|
|
| The Article - php | |||||||||
| Written by Chetankumar Akarte | |||||||||
| Wednesday, 07 March 2007 | |||||||||
Page 4 of 7 Adding data to table :To add data to table, we need to build and execute a SQL query. PHP provides the mysql_query() function for that purpose. mysql_query() requires two inputs: first, the SQL query and second, a link identifier. Identifer is optional. If omited, then query is sent to the database server to which you last connected.mysql_query() returns true if the query executes successfully. If there are any syntax errors or if you do not have permission to access database, then it return false.
Code 4 :- adddata.php The adddata.php produces output as shown in Output-4.
Output 4: adddata.php |
|||||||||
| Last Updated ( Tuesday, 13 March 2007 ) | |||||||||