0

ok so here is the error: 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, content, date) VALUES('', '', '', '')' at line 1 Between the apostrophes is the information from the form.

the code is this:

<?php 
SESSION_start(); 
include("dbcon.php"); 
dbcon(); 

$user = mysql_real_escape_string($_POST['user']); 
$content = mysql_real_escape_string($_POST['content']); 
$date = mysql_real_escape_string($_POST['date']); 

mysql_query("INSERT INTO wall (user, from, content, date) VALUES('$user', '$user', '$content', '$date')")  
or die(mysql_error());   
echo  "<h1>Your post was successful</h1>"; 
echo "This page will be re-directed to your wall in 5 seconds"; 
header('Refresh: 5; url=yourwall.php'); 

?>

whats wrong??

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by Shanti C
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.