PHP SQL INSERT INTO syntax error
I have a problem with my "INSERT INTO" sql statement in PHP.
I'm working on it for 2 houres now but can't get it fixed.
This is the script:

    <?php
	$from = $_REQUEST['from'];
	$to = $_REQUEST['to'];	
	$message = $_REQUEST['message'];

	$db_host = 'mysql04.xxxx.nl';
	$db_user = 'xxxxx';
	$db_pwd = 'xxxxxx';
	$database = 'gewoon_chatapp';
		
	$con = mysql_connect($db_host,$db_user,$db_pwd);
	if (!$con)
      {
         die('Could not connect: ' . mysql_error());
      }
	mysql_select_db($database);

	$sql = "INSERT INTO chatten (from, to, message) VALUES ('$from', '$to','$message')";
	
	if (!mysql_query($sql,$con))
    {
    echo mysql_error();

 			print json_encode("error");
    }else{
  		print json_encode("true");
    }
	mysql_close();
    ?>

My table's name is chatten, with the columns id (auto increment), from (varchar 30), to (varchar 30), message (text), delivered(int standard value 0)

but when I execute this php script in my adress bar with this URL: 
http://www.gewoonviavia.nl/sendchat.php?from=fabian&to=wessel&message=hoi
it says:
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 'from, to, message) VALUES ('fab', 'wes', 'hoi')' at line 1"error" 
I really don't know what I could be!

PHP SQL INSERT INTO syntax error
===

I have a problem with my "INSERT INTO" sql statement in PHP.
I'm working on it for 2 houres now but can't get it fixed.
This is the script:

    <?php
	$from = $_REQUEST['from'];
	$to = $_REQUEST['to'];	
	$message = $_REQUEST['message'];

	$db_host = 'mysql04.xxxx.nl';
	$db_user = 'xxxxx';
	$db_pwd = 'xxxxxx';
	$database = 'gewoon_chatapp';
		
	$con = mysql_connect($db_host,$db_user,$db_pwd);
	if (!$con)
      {
         die('Could not connect: ' . mysql_error());
      }
	mysql_select_db($database);

	$sql = "INSERT INTO chatten (from, to, message) VALUES ('$from', '$to','$message')";
	
	if (!mysql_query($sql,$con))
    {
    echo mysql_error();

 			print json_encode("error");
    }else{
  		print json_encode("true");
    }
	mysql_close();
    ?>

My table's name is chatten, with the columns id (auto increment), from (varchar 30), to (varchar 30), message (text), delivered(int standard value 0)

but when I execute this php script in my adress bar with this URL: 
http://www.gewoonviavia.nl/sendchat.php?from=fabian&to=wessel&message=hoi
it says:
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 'from, to, message) VALUES ('fab', 'wes', 'hoi')' at line 1"error" 
I really don't know what I could be!
