Re: [PHP] $HTTP_REFERER
On Fri 17 Aug 2001, Nick Davies wrote: Probably best to read stuff first ;) try preg_match preg_match(/^(http:\/\/)?([\/]+)/i, $HTTP_REFERER, $hostname); the hostname will be in $hostname[2] Hope it helps. Thanks. But is using $HTTP_REFERER the most secure way of doing it? Or can the $HTTP_REFERER be forged and thus gaining unauthorized access to the forms? -- Erich Zigler A sick mind is not necessarily the sign of a neat desk. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] strstr Question
I am currently writing a piece of code that when a user enters in their email address it will check it for validity. In this instance they are supposed to type in [EMAIL PROTECTED] But if they just type in user I want it to add @domain.com at the end by default. This is the piece of code I have so far, but it does not seem to be working... if (strstr($email, '@')) { continue; } else { $email = $email . @domain.com; } I've been all over the documentation but I am obviously missing something. If anyone could be of any assistance I would greatly appreciate it. Thanks you. -- Erich Zigler I prefer rogues to imbeciles, because they sometimes take a rest. -- Alexandre Dumas (fils) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]