Re: RE: is there way to pass an array( or variables) to another page without sessions or cookies?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ross,

On 7/5/05, Ross <ross@xxxxxxxxxxxxx> 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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux