mediasix Posted March 19, 2008 Share Posted March 19, 2008 Hi, when processing my form i am getting the following error: Parse error: syntax error, unexpected T_IS_NOT_IDENTICAL, expecting ',' or ')' (code below) Please help, thanks mediasix <?php include("includes/mysqlconnect.php") ?> <?php if(isset($_REQUEST['submit']!=='add_entry',)) { $title=$_REQUEST['title']; $content=$_REQUEST['content']; $query ="INSERT INTO test (title,content)"; $query.=" VALUES ('$title','$content')"; $result=mysql_query($query); if ($result) echo "<b>Successfully Posted!</b>"; else echo "<b>ERROR: unable to post.</b>"; } elseif(isset($_REQUEST['submit']!=='add_entry_two')) { $title=$_REQUEST['title']; $content=$_REQUEST['content']; $query ="INSERT INTO test_two (title,content)"; $query.=" VALUES ('$title','$content')"; $result=mysql_query($query); if ($result) echo "<b>Successfully Posted! TWO</b>"; else echo "<b>ERROR: unable to post.</b>"; } elseif(isset($_REQUEST['action']!=="del")) { mysql_query("DELETE FROM test WHERE id={$_REQUEST['id']};"); } else { echo "NOT WORKING BUD"; } ?> Link to comment https://forums.phpfreaks.com/topic/96891-parse-error-syntax-error-unexpected-t_is_not_identical-expecting-or/ Share on other sites More sharing options...
revraz Posted March 19, 2008 Share Posted March 19, 2008 Dont check if it's set and compare it at the same time. Split them with a OR || Link to comment https://forums.phpfreaks.com/topic/96891-parse-error-syntax-error-unexpected-t_is_not_identical-expecting-or/#findComment-495805 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.