Reply to Re: Passing hidden form fields

Your name:

Reply:


Posted by J.O. Aho on 12/16/05 02:10

Sam wrote:
> I'm using forms to pass variables between, for example, Page1 and
> Page2.
>
> This all works fine. However, if I open Page2 directly without first
> entering data in the form on Page1, I get an error similar to this:
>
> Notice: Undefined index: pc in
> content/Host/e/b/<bbbb>.com/web/thanks.php on line 223
>
> What's the best way to approach this so that the user doesn't see such
> an ugly message if they end up on Page2 without first going to Page 1?

You check if the variable is set with isset(), if it's not set, then don't
execute the line

eg:

isset($index) {
echo $index;
}


//Aho

[Back to original 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

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