die() and exit() function in php

 <?php


// After die() and exit() function, code will not get executed

echo "1. Some Message<br>";
echo "2. Some Message<br>";
echo "3. Some Message<br>";
die("Here is some Error!");
echo "4. Some Message<br>";
echo "5. Some Message<br>";

// echo "6. Some Message<br>";
// echo "7. Some Message<br>";
// exit("Here is Some Error!");
// echo "8. Some Message<br>";
?>



Comments

Popular posts from this blog

Ajax Insert Records in Database Tutorial in PHP

SubQuery with EXISTS and NOT EXISTS in PHP

Submitting HTML Form data in JSON File (without MySql Database) in PHP