You are here: RE: [PHP] HELP! form validation « PHP « IT news, forums, messages
RE: [PHP] HELP! form validation

Posted by Jim Moseby on 06/09/05 17:02

>
> 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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация