Forum Moderators: coopster
mysql_connect($mysql_server, $mysql_admin, $mysql_pass) or die("<img src='http://site.com/error.png'>");
BUT it doesnt render properly in the browser, unless you click the link
i need to include
// Create: HEADERS //
header("Content-type: image/png");
header ("Cache-Control: max-age=7200")
within the DIE command or something, so the browser will take it as an image
'<a href="http://site.com/script.php?name=' . $profile['user'] . '" target="_blank"><img src="http://site.com/script.php?name=' . $profile['user'] . '" alt="' . $profile['user'] . '" border="0" /></a>',
now if this user exists, it LOADS fine, but if it cant connect to mysql server, it gives the DIE, and SHOWS THE ALT text, the headers dont get sent during the die command it shows the ALT text, when it LOADS fine it sends the headers cause headers are at the end of the script
// PINGS //
ImagePng($image);
ImageDestroy($image);
at the end, the beginning is mysql_connect($mysql_server, $mysql_admin, $mysql_pass) or die("<img src='http://site.com/error.png'>");
i want to show an unavailable.png image, but instead im left with the ALT text from <a href="http://site.com/script.php?name=' . $profile['user'] . '" target="_blank"><img src="http://site.com/script.php?name=' . $profile['user'] . '" alt="' . $profile['user'] . '" border="0" /></a>',
something isnt getting passed in the die command