You are in serious need of some regex here...google email regex and you will
have enough results to get you what you want.
Postal Code (assume 2 letters 4 dgits in that order
if (ereg("^[A-Z]{2}{0-9]{4}$",$_POST['postal'])){
...
As for pasting it back to the form, I would suggest you hav
used is a column name, if you need to surround it use the back ticks (beow
the esc key, same button as the tilde (~). That is why it fails...it
shouldn't be req'd for the update, though the value may need to be quoted
depending on the col data type
Bastien
>From: "Ron Piggott" <[EMAIL PROTECTE
turn of magic quotes or test for it before using addslashes
Bastien
>From: "Petzo" <[EMAIL PROTECTED]>
>To: php-db@lists.php.net
>Subject: [PHP-DB] addslashes + stripslashes + mysql question
>Date: Mon, 16 May 2005 11:20:41 +0300
>
>Hi,
>
> My question is about the norlmal behaviour of PHP an