Web Programming with PHP

25 Inserting Data Into a Database

mysql_query() sends a query to the MySQL database. To insert data into a database, an insert query must be executed:

INSERT INTO table_name (col_name1, col_name2, ...) VALUES (value1, value2, ...)