script to check if form is submitted from the same page?

From: Date: Sat, 12 Aug 2006 18:55:59 +0000
Subject: script to check if form is submitted from the same page?
Groups: php.general 
Request: Send a blank email to php-general+get-240564@lists.php.net to get a copy of this message
could I use this code to check if form is submitted from the same page/same domain if ($_POST['form_submitted'] == 'Yes') { if (preg_match($_SERVER['HTTP_HOST'], $_SERVER["HTTP_REFERER"]) == 0) {
       die ('^&%*^%#@#');
} } thanks -afan

« previous php.general (#240564) next »