Jump to content

Archived

This topic is now archived and is closed to further replies.

mediasix

Parse error: syntax error, unexpected T_IS_NOT_IDENTICAL, expecting ',' or ')'

Recommended Posts

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";
}
?>

Share this post


Link to post
Share on other sites

Dont check if it's set and compare it at the same time.  Split them with a OR ||

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.