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

Posted by "Dave Sayer" on 06/09/05 18:33

Thanks jim, sorry for troubling you. Ive done that now and can see that all
vars are being set but the code in the form to return the contents of $err1
doesn’t display the contents, just emptiness. Thanks for your help, I will
keep on playing with it.

Cheers

Dave

> -----Original Message-----
> From: Jim Moseby [mailto:JMoseby@nrbindustries.com]
> Sent: 09 June 2005 15:49
> To: 'dave@digitalmeme.com'; php-general@lists.php.net
> Subject: RE: [PHP] HELP! form validation
>
> > > > > Eg:
> > > > > $error_style = 'color: rgb(255,0,0)';
> > > > > if(!$name){$err1 = $error_style; $error[]="*please enter
> > > > > your name\n";}
> > > > >
> <snip!>
> > > Does it re-populate the fields with the previously entered data?
> >
> > 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.
>
> This baffles me too then. In your code above, if $name is not set, $err1
> will be set to equal $error_style. There is obviously more coming into
> play
> than just this code snippet. Double-check your variable names. Place
> strategically located 'echo' statements to see what is happening, for
> instance, right after the above 'if' statement, place an 'echo $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

 

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

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