Forum Moderators: coopster
$sql = "SELECT data FROM table WHERE STATUS =1";$result = mysql_query($sql, $dblink) or die("System down");
while ($newArray = mysql_fetch_array($result))
{
$propname = $newArray['propname'];
echo "$prop<br>";
}
As I have just taken on a new server with PHP5 I have plenty of select statements like the above so am busy testing to see what needs changing, but can't even get this simple select to work, thanks in advance
$new_pic = "$emailaddress+$key.jpg";
$new_image = "$uploaddir$new_pic";$sourcefile = "$uploaddir$new_pic";
$picsize = getimagesize("$sourcefile");
$source_x = $picsize[0];
$source_y = $picsize[1];if ($source_x > $source_y)
{
$percentage = ($target / $source_x);
} else {
$percentage = ($target / $source_y);
}
$dest_x = round($source_x * $percentage);
$dest_y = round($source_y * $percentage);$targetfile = "$uploaddir".$emailaddress."-".$key.".jpg";
$jpegqual = 90;
$source_id = imagecreatefromjpeg("$sourcefile");
$target_id = imagecreatetruecolor($dest_x, $dest_y);
$target_pic = imagecopyresized($target_id,$source_id,0,0,0,0,$dest_x,$dest_y,$source_x,$source_y);
imagejpeg($target_id,"$targetfile",$jpegqual);
unlink("$new_image");
Quick legend, it creates a temp image called $emailaddress+$key.jpg
resizes, renames (replacing + with -) then deletes the temp image, sometimes the temp image isn't resized and it bombs out