note 42476 added to function.die
| From: | Q-tech at rn2 dot php dot net | Date: | Tue, 18 May 2004 14:12:56 +0000 |
| Subject: | note 42476 added to function.die | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-69768@lists.php.net to get a copy of this message | ||
I found it very usefull in combination with Javascript, when I wanted to restrict someone, display a
nicer error message and/or cover the mess :-)
For example, this will return the user to the previous page, without letting him to see current one:
die ("<script language=\"Javascript\">history.go(-1)</script>");
----
Manual Page -- http://www.php.net/manual/en/function.die.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+42476
Delete -- http://master.php.net/manage/user-notes.php?action=delete+42476&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+42476&report=yes
Search -- http://master.php.net/manage/user-notes.php