PHP Parse error unexpected T_VARIABLE -
i maintain receiving error in code below when execute file. i've looked on , can't seem figure out i'm doing wrong:
parse error: syntax error, unexpected t_variable in /home/w0650266/public_html/blog/viewentry.php on line 32.
line 32 line starting $sql = ....
if (isset($_post['submit'])) { //$_post['name'] = addslashes($_post['name']); //$_post['comment'] = addslashes($_post['comment']); $sql= "insert comments (blog_id,dateposted,name,comment) values (".$validentry.",now(),'".$_post['name']."','"$_post['comment']."');"; mysqli_query($db,$sql); header("location: http://".$_server['http_host'].$_server[script_name']."?id=".$validentry);
add point "." before $_post['comment']
in sql query.
php php-parse-error
No comments:
Post a Comment