Share
Insert Data Explanation
mysql_query("INSERT INTO example
Again we are using the mysql_query function. "INSERT INTO" means that data is going to be put into a table. The name of the table we specified to insert data into was "example".
(name, age) VALUES('Putu Sanjaya', '23' ) ")
"(name, age)" are the two columns we want to add data into. "VALUES" means that what follows is the data to be put into the columns that we just specified. Here we enter the name Putu Sanjaya for "name", and 23 for "age".
Be sure to note the location and number of apostrophes and parentheses in the PHP code, as this is where a lot of beginner PHP/MySQL programmers run into problems.