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
$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." ;
}
?>
Personal INFO
No comments:
Post a Comment