Troubleshoot MySQL query
- by Victor
I need help with this code, it doesent insert the values to my database.
Probably a simple problem but it's late here in Sweden so i would appriciate if someone could have a look at this and tell me what's wrong:
include "../../inc/mysql_config.php";
$to = mysql_real_escape_string($_POST['to']);
$message = mysql_real_escape_string($_POST['message']);
mysql_query("INSERT INTO messages (to, message) VALUES ('".$to."', '".$message."')");
Every variable have an value, double checked that and the mysql_config.php is working.