javascript - PHP can I kill the script and have an alert? -
I want to kill a script and post a warning on the same page
My code:
if (empty ($ _ POST ['item'])) {print '& lt; Script type = "text / javascript" & gt; '; Print 'alert ("item is required"); Print '& lt; / script & gt; '; } The problem is that the script does not kill
is there a way to do that it kills the script, prints, and stops the same Page?
Use
Exit zero ([string $ Status]] or Exit zero (int $ position) < P> To end your current php script.
Comments
Post a Comment