![]() |
|||
PHP
IT Tags
magento ecommerce SimpleXML Xampp UPDATE Remove Duplicate server shutdown mysql server photo gallery XHTML Combo box connection to MYSQL indexing solr ajax Solr XML php mail sdf check domain my_thread_global_end control panel Simplexml Parser associative arrays PHP and FLash multiple file uplo Overlapping Layers include Stop Script Mobile site local server local server objects |
How To Stop Script?
By: rekha singh | 02 Aug 2010 12:37 pm
Hi, I am looking for a way to stop a script, kinda. For example:
if(strlen($username ) == 0)
{ echo "Username is empty! All fields are required!"; }
If it echo's "Username is empty! All fields are required!" I want it to stop running, so that no further error messages display in my script, but if it does not echo then I continues running.
Is there a way to do this?
CommentsHi, you can put an exit() function after your echo; So, try this:
if(strlen($username ) == 0) {
echo "Username is empty! All fields are required!";
exit();
}
>
By: rekha singh | 02 Aug 2010
|
