Hello,
I have a script which uploads a banner to a folder but i havn't got a tmp folder on my server can any one please help me alter the script so it points to a different folder.
Here is the script:
function BannersAdd($login,$pass,$bid,$userfile,$clickurl, $PATH,$URL) {
$imagehw = getimagesize("$userfile");
$imagewidth = $imagehw[0];
$imageheight = $imagehw[1];
// check to make sure the size is okey.
if ($imagewidth == 468 AND $imageheight == 60){
if (copy($userfile, "$PATH/banners/$bid.gif")){
$imageurl=$URL . $bid .".gif";
mysql_query("update banner set imageurl='$imageurl' where bid='$bid'");
mysql_query("update banner set clickurl='$clickurl' where bid='$bid'");
}else{
echo "File failed to copy!";
}
}else{
echo " Your image was $imagewidth x $imageheight It needs to be 468 x 60";
}
bannerstats($login, $pass);
}