Be careful if you use the exit(); command ( also known as die(); )... Once the server executes either this function it will stop processing your script. This will likely cause problems if you're displaying a graphical user interface, since the html tags you'd meant to output after the error occured will not be sent to the client machine.
You should structure your php page with locical IF statements within PHP. So:
<?php
if( $passwordStatus == "Bad" ) { //return error msg for bad password
echo "<b>Bad Password! Go Away!</b><br />\n";
} else { // password is good, continue
echo "Hi!<br />\n" .
"Welcome to our site, authorized user<br />\n";
} // end if else statement
?>
PHP has built in database connectivity funtions for oracle, mysql, sql server ECT so you'll first need to familiarize yourself with the relevant functions for whatever database you're using. mySQL is overwhelmingly the most widely used with PHP... The PHP and Databases forum is better suited for any further elaboration.
Main Topics
Browse All Topics





by: rstorey2079Posted on 2003-11-11 at 13:36:51ID: 9725949
exit();
en/functio n.exit.php
you can optionally specify an error code as an argument if you wish.
http://us2.php.net/manual/