ok mostly i tell people to read the php manual... but look like you need to read the mysql manual... you would find all your answers there...
a review to wet your appetite..
there are three basic sql statements which change data in the database
INSERT
UPDATE
DELETE
if you are trying to make a new row you need to use INSERT
if you are tyring to update a specific row you need to use UPDATE and make sure to use a WHERE statement so it knows which row to update, read up on what goes into a WHERE clause in the mysql database
UPDATE table_name SET column_1='foo', column_2='bar' WHERE column_3='baz'
doing a blind UPDATE without a where clause will change the values of every row in the database, which i not what i think you are attempting
the DELETE clause also needs a WHERE
DELETE FROM table_name
will remove all rows, which will empty the table of all data, which is not what you want