note 68335 added to function.ereg-replace

From: Date: Sun, 23 Jul 2006 21:42:26 +0000
Subject: note 68335 added to function.ereg-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-115064@lists.php.net to get a copy of this message
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>"; ?> ---- Server IP: 195.70.37.52 Probable Submitter: 86.101.237.15 ---- X-Spam-Status: No, hits=3.3 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER, HTML_MESSAGE autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.ereg-replace.php Edit -- http://master.php.net/note/edit/68335 Del: integrated -- http://master.php.net/note/delete/68335/integrated Del: useless -- http://master.php.net/note/delete/68335/useless Del: bad code -- http://master.php.net/note/delete/68335/bad+code Del: spam -- http://master.php.net/note/delete/68335/spam Del: non-english -- http://master.php.net/note/delete/68335/non-english Del: in docs -- http://master.php.net/note/delete/68335/in+docs Del: other reasons-- http://master.php.net/note/delete/68335 Reject -- http://master.php.net/note/reject/68335 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#115064) next »