$location = "localhost";
$username = "cape";
$password = "e******";
$database = "cape_program";
$id = $_POST["list"];
$sell = "true";
mysql_connect($hostname,$username, $password) OR DIE (" ");
mysql_select_db($database);
$conn = @mysql_connect($location,$username,$password);
$path = '/wizard/data';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);
mysql_select_db($database,$conn) or die ("Could not open database");
$result = mysql_query("SELECT tn,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10 FROM db_x WHERE sold='$sell'");
list ($tn,$p1,$p2,$p3,$p4,$p5,$p6,$p7,$p8,$p9,$p10) = mysql_fetch_array($result);
unlink("http://yourcapecoral.com/wizard/data/$tn");
unlink("http://yourcapecoral.com/wizard/data/$p1");
unlink("http://yourcapecoral.com/wizard/data/$p2");
unlink("http://yourcapecoral.com/wizard/data/$p3");
unlink("http://yourcapecoral.com/wizard/data/$p4");
unlink("http://yourcapecoral.com/wizard/data/$p5");
unlink("http://yourcapecoral.com/wizard/data/$p6");
unlink("http://yourcapecoral.com/wizard/data/$p7");
unlink("http://yourcapecoral.com/wizard/data/$p8");
unlink("http://yourcapecoral.com/wizard/data/$p9");
unlink("http://yourcapecoral.com/wizard/data/$p10");
$delete = "DELETE FROM db_x WHERE sold='true'";
mysql_query($delete) or die ("An error has occured, and the data can not be added to the list, please contact Gabor. <Br />Error: " . mysql_error());
?>
The Script is soposed to delete the files, yet when i run it i get this messege:
Warning: unlink(http://yourcapecoral.com/wizard/data/Sunset.jpg): No such file or directory in /home/cape/public_html/wizard/recycle2.php on line 36
the php file is located at
yourcapecoral.com/wizard
and the image files are located at
yourcapecoral.com/wizard/data
Can anyone help determine whats wrong?
~Gabor