note 68335 deleted from function.ereg-replace by didou
| From: | didou@php.net | Date: | Mon, 22 Jan 2007 00:25:38 +0000 |
| Subject: | note 68335 deleted from function.ereg-replace by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-122012@lists.php.net to get a copy of this message | ||
Note Submitter:
----
Hi! I was asked to make a site that allows users to log in with their names from all over europe
the code is messy and could be shorter but I guess it's easier to understad it this way
<?php
$nick2=$_POST['nick'];
$nick=stripslashes($nick2);
$nick= ereg_replace("[^A-Za-z0-9 .\-|_ÃAÃÃAÃAAÃEÃEÃIÃÃINOÃ
ÃOÃUÃUÃÃaáâaäaaçeéeëiÃîin
oóôoöuúuüýyAaÄÄÄÄ
ÄÄCcCcÄÄ
ÄÄÄÄEeEeEeÄÄÄÄGgGgGgGgHh
HhIiIiIiIiIiJjKĹĺLlĽľÅÅÅÅNnÅÅOo
OoÅÅOoÅÅRrÅÅÅÅSsÅÅŠšŢţŤťTt
UuUuUuŮŰůűUuWwYyYŹźŻżŽž
fOoUuAIiOoUuUUuUuUuÃOÃO\]", "", $nick);
$nick= ereg_replace("<>\/'~Ë^˰Ë`Ë´:", "", $nick);
$nick= ereg_replace(" ", "", $nick);
$nick=trim($nick);
if ($nick!=$nick2) echo "Nick contains invalid characters<br>";
?>