This is my mysql code:
if (isset($submit)) {
$con = mysql_connect("myhost", "myusername", "mypassword");
mysql_select_db("bai11814_po, $con");
$query = ("INSERT INTO 'callback' ('id', 'name', 'telephone') VALUES ('', '$name', '$telephone')");
mysql_query("$query")
or die(mysql_error());
echo ("it worked");
}
?>
And this is the error message
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''callback' ('id', 'name', 'telephone') VALUES ('', 'oioiupu', 'opoupip')' at line 1
I have been to various different tutorials and tried different ways of doing it, if I remove the quotations from around my table name (callback) the error is no database selected. I have tried removing the brackets around the entire query string, same syntax error, removing the brackets around (name, telephone etc) an d even tried not putting id into my query, and leaving out the empty space for VALUES, for two days solid I have messed around tweak it here tweak it there, one bit at a time, but the problem is, when you change another thing, you don't know if the way you had a certain bit two tests ago ould work now that you have changed this, when you're a begginner I mean. Even when I came on here I looked at other people's responses and copied how to do it and it still didn't work. Someone please tell me where I'M going wrong.