Web EndMemo

PHP Die



die() will stop executing the php code and exit. It must have a message as parameter.
<?PHP
if ($_POST['ex'] == "") die ("Information not provided!");
?>


die() is usually used in database connection, if not connected, then stop executing the code.
<?PHP
$connect = mysql_connect ("$host", "$user", "$pass") or die (mysql_error());
mysql_select_db("$dbs",$connect) or die (mysql_error());
?>