Re: ereg

From: Date: Thu, 17 Apr 2003 14:51:14 +0000
Subject: Re: ereg
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-144292@lists.php.net to get a copy of this message
On Thursday 17 April 2003 22:42, C.R. wrote: > This is what I have: > > if(!ereg("^[a-zA-Z[:space:]\\']*$", $formdata["lastname"])) { > $error = "Invalid Input"; > } > > $formdata["lastname"] is a session variable and can't be changed as it is > used throughout the site. I don't understand though why it it even being > changed as I thought ereg was just an expression. I'm not sure about the validity of your regex, but I can assure you that ereg() will NOT change your data. That 'problem' is caused by having magic_quotes_* on. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* I either want less decadence or more chance to participate in it. */

« previous php.general (#144292) next »