Question: I am trying to learn mysql and having some problem with updating/adding data to the table

this is my code and after running this page when I go to phpmyadmin to see if the new data showed up, i dont see it there.

```
<?php

$conn = mysql_connect($dbhost, $dbuser, $dbpass); 

if(!$conn) {  die("Could not connect");   }
$dbname = "test";
mysql_select_db($dbname, $conn);

mysql_query("INSERT INTO 'test'.'table1' 
               ('A1', 'A2', 'A3', 'A4', 'A5', 'A6', 'A7', 'A8') 
             VALUES  
               ('test1', 'test2', 'test3', 'test4', 'test5', 'test6', 'test7', 'test8')"); 

mysql_close($conn);

?>

```

Can anyone tell me whats wrong with this ?

Answer: 
Be sure to do error checking to see if the mysql connection is having trouble too:

```
if(!mysql_select_db($dbname, $conn)) {
   echo  mysql_error($conn);
}else {

    if(!mysql_query("INSERT INTO  'test'.'table1' ('A1', 'A2', 'A3', 'A4', 'A5', 'A6', 'A7', 'A8') VALUES ('test1', 'test2', 'test3', 'test4', 'test5', 'test6', 'test7', 'test8')")) {
      echo  mysql_error($conn);
   } 
}

```
Here is a tip for you in general when working with MYSQL (Or any SQL DB). If you don't know how to do something, or you are getting things wrong. Use the GUI tools provided for you to do the job, then check the resulting code. 

Enter PHPMyAdmin, Do an insert, and then copy and paste the code to see what you are doing wrong.