Hi,

I have a few basic or more advanced questions that seam quite newbie like although I always wanted a professional answer. So here I go:

1. Is it possible to use an include file on the die function:

mysql_connect("localhost", "bob", "bobs_pass") or die(include(die.html));

Is the above possible in any way?


2. How do you normally do if statements in the below case and which is 'better'

$get = mysql_query("SELECT * FROM bobs_address");
if(!get) {
print "Hahahah";
print mysql_error();
} else {

// OTHER STUFF HERE AND THEN ADD A } AT THE VERY END

}


or...

$get = mysql_query("SELECT * FROM bobs_address");
if(!get) {
print "Hahahah";
print mysql_error();
exit;
}


3. I must check something for mutliple aspects:

Check that $name isn't blank, doesn't contain numbers, and doesn't exist in the database. How would I easily do this. The way I currently do it would require } at the end of the script and at the end of a script there are about 1 million of them!

They may seam simple and with different people there are different opinions, but if there a right way?

Thanks
Pete