Code: Select all
Elseif($mode == "post"):
$title = $_POST['title'];
$blog = $_POST['blog'];
if(empty($blog) || empty($title)):
echo "You need to fill in <strong>all</strong> fields.
EndIf;
$blog = unformat($blog);
$query = "INSERT INTO nl_blogs (title, blog, timestamp) VALUES ('$title', '$blog', NOW())";
$result = $mysql->query($query);
if(empty($result)):
echo "Failed to post";
exit;
EndIf;
header("Location: nl_blogs.php");
Elseif($mode == "delete"):Line 119 is the $query. If I put it into heredoc, then I get the same error except on line 125 which is the echo.Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in c:\appserv\www\nlogger\nl_blogs.php on line 119
Any Idea?
-Nay