Re: Zip to postcode

From: Date: Wed, 02 Apr 2003 13:12:57 +0000
Subject: Re: Zip to postcode
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-141980@lists.php.net to get a copy of this message
Looks like i have it sussed thank you to all. HOWEVER :o( I have two small problems that i cannot solve, and seeing as you are all gods in my opinion maybe you can help me further before i throw myself out the window. I am getting this error when i am taken to the member page after correctly fill out the form: Warning: extract() expects first argument to be an array in /home/.sites/112//New_member.php on line 23 Also even though i am taken into the members area the mysql database is not updating itself. Why? Here is the code for the error message: $sql = "SELECT name FROM members WHERE username='$logname'"; $result = mysql_query($sql) or die("Couldn't execute query 1."); $row = mysql_fetch_array($result,MYSQL_ASSOC); extract($row); echo "<html> Thank you for your help i take my hat off to all of you, how you understand all this is byond me! Andy "Andy" <andy.davey@tiscali.co.uk> wrote in message news:20030402115421.34256.qmail@pb1.pair.com... > Can someone please tell me how i change the following code: > if (!ereg("^[0-9]{5,5}(\-[0-9]{4,4})?$",$postcode)) > > to a UK postcode QQ1 1QQ > When i fill out the form it tells me that the postcode is not valid and i > think it is because it is in zip code format. > > Thank you > > Andy > >

« previous php.general (#141980) next »