I am checking if a particular value is set using isset. I want to quit the HTML with displaying error message like "name not found , Enter a valid name". Currently I am checking like
if ((! isset($_GET["name"])) or (! is_dir($_GET["name"])) or (empty($_GET["name"]))) {
Print "Name not found, Enter a valid name"
}
After the print, I want to exit without further execution of HTML code. how can I exit with the my error message and no default error message from PHP
Thanks
Die or exit: see the php documentation
die ("I'm dyin over here");
die("Name not found, Enter a valid name");
That should help!
Regards, Felix