You are here: Re: [PHP] RE: is there way to pass an array( or variables) to another page without sessions or cookies? « PHP « IT news, forums, messages
Re: [PHP] RE: is there way to pass an array( or variables) to another page without sessions or cookies?

Posted by sylikc on 11/13/12 11:21

Ross,

On 7/5/05, Ross <ross@aztechost.com> wrote:
> Can you give me a quick emaple of how this would work, with an array.
>
> I have an array of errors ($errors[]) for a form, when the errors are
> trigger, I am trying to send them to a window which tells them what the
> errrors are. I don't really want to get into sessions or cookies.
>
> is there way to pass an array( or variables) to another page without
> sessions or cookies?

I don't really know why you would want to pass an array such as
$errors[] around your pages anyway. Passing things by POST/GET are
somewhat limited and it's generally not done that way for some block
fo data that might not be useful for that particular page.

I'm guessing you want to display a particular error when the user
encounters it. This can be done by dropping your $errors[] array into
another page, and then reading off a $_GET[] to determine which error
you want to resolve.

Example: yourpage.php ...
if it encounters an error, send to errors.php?id=3
where 3 is your error #

errors.php holds your $errors[] array which will use some switch/case
or some other logic to resolve the error for the user.


Is that what you were shooting for?


/sylikc

 

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

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