Yes, it does. I already have set the variables manually like you say. Its just the $err1, $err2 vars do not seem to be set with the data stored in $error_style. Dave > > > -----Original Message----- > > From: Jim Moseby [mailto:JMoseby@xxxxxxxxxxxxxxxxx] > > Sent: 09 June 2005 15:02 > > To: 'dave@xxxxxxxxxxxxxxx'; Jim Moseby > > Cc: php-general@xxxxxxxxxxxxx > > Subject: RE: HELP! form validation > > > > > > > > Hi Jim, Ive modified the code for the form by adding the > > > style info & vars > > > to the relevant fields and set the var for the error style > > > but for some > > > reason the $error_var wont pick up the syle from $error_syle_var. > > > > > > Eg: > > > $error_style = 'color: rgb(255,0,0)'; > > > if(!$name){$err1 = $error_style; $error[]="*please enter > > > your name\n";} > > > > > > $err1 does not pick up $error_style in the actual form and I just get > > > style="" instead of style="color: rgb(255,0,0)". Im a tad > > > baffled and im > > > sure its something simple that im missing. > > > > > > Any ideas? > > > > > > > > > Does it re-populate the fields with the previously entered data? If > not, > > register_globals might be off, and you'll have to set the variables > > manually: > > > > $name=$_POST['name']; > > > > ...or use them directly: > > > > if (!$_POST['name']){...} > > > > JM > > > > -- > > No virus found in this incoming message. > > Checked by AVG Anti-Virus. > > Version: 7.0.323 / Virus Database: 267.6.6 - Release Date: 08/06/2005 > > > > -- > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > Version: 7.0.323 / Virus Database: 267.6.6 - Release Date: 08/06/2005 > -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.323 / Virus Database: 267.6.6 - Release Date: 08/06/2005 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php