Josh
10-17-2003, 02:50 PM
Any ideas on how I can rewrite this so when the script fails, the only text on the screen will be my own custom warning?<?php
$mysql_server = "";
$mysql_user = "";
$mysql_password ="";
$link = mysql_connect("$mysql_server", "$mysql_user", "$mysql_password");
if ($link) {
print ("<p>Connected successfully</p>");
} else {
print ("<p>Could not connect</p>");
}
mysql_close($link);
?>Here's an example of what the page looks like when the script fails. (http://vintagecloning.host.sk/test)
$mysql_server = "";
$mysql_user = "";
$mysql_password ="";
$link = mysql_connect("$mysql_server", "$mysql_user", "$mysql_password");
if ($link) {
print ("<p>Connected successfully</p>");
} else {
print ("<p>Could not connect</p>");
}
mysql_close($link);
?>Here's an example of what the page looks like when the script fails. (http://vintagecloning.host.sk/test)