I am trying to make a php script which will accept a password text and will delete the relevant data from the database. I get this error when i load the script
syntax error, unexpected T_IS_NOT_EQUAL in /home2/krisindi/public_html/deletead.php on line 4
<?php
$password = $_POST["password"];
if ( $password ) != 0 )
{
$id = $data->select ("Classified", "AdID", array ("Password => ($password)));
$data->delete ( "AdExtraField" , array ( "AdID" => intval ( $id["AdID"] ) ) ) ;
$data->delete ( "Classified" , array ( "Password" => ( $password ) ) ) ;
exec ( "chmod ../media/ 777" ) ;
$image_file = "../media/cls_".$id["AdID"]."_520.jpg" ;
if ( file_exists ( $image_file ) )
unlink ( $image_file ) ;
for ( $i = 1 ; $i <= 5 ; $i++ )
{
$image_file = "../media/cls_".$id["AdID"]."_".$i."_520.jpg" ;
if ( file_exists ( $image_file ) )
unlink ( $image_file ) ;
}
exec ( "chmod ../media/ 755" ) ;
$_SESSION["str_system_message"] = "Classified deleted successfully." ;
}
?>
<html>
<head>
<title>Personal INFO</title>
</head>
<body>
<form method="post" action="<?php echo $PHP_SELF;?>">
Password:<input type="text" size="12" maxlength="12" name="password">:<br />
<input type="submit" value="submit" name="submit"><br />
</form><br />