Hi Chris,

I don't think there is anything wrong with this. The only gotcha that I can
come up with is now that you are using session variables rather than "get"
variables, you will no longer be able to bookmark the "state of that page",
I think?

What I mean is if your URL reads:

index.php?e_name=myname&e_comp=mycompany

This can be bookmarked by the user and they can return to that page with the
code presumably parsing the "get" variables. With the session variables, I
don't think the user will be able to bookmark the page and return to it on a
later date (after the session has expired) and have the session variables
parsed correctly. I am not sure of this.

However if you don't require the page to be bookmarked in it's latest state
then no big deal. If you do you can use cookies or record the state
sever-side to work around this.

ck
-- 
Cheap Domain Registration | Web Hosting | Email Packages | + more
Fantastic prices -- Even better service.
http://www.hosttohost.net


Chris W. Parker [EMAIL PROTECTED] on 10/20/03 4:31 PM wrote:

> Hiya.
> 
> The way I do my forms is I create a form page and a corresponding
> processing page. I don't like to post forms to themself so I always make
> a processing page that header("Location: ...")'s back to the original
> page.
> 
> Normally I create a long string that get's posted back to the original
> page via the querystring. For example:
> 
> if(the name is blank)
> {
> $errors = "e_name=Name cannot be blank&";
> }
> 
> if(the company is blank)
> {
> $errors .= "e_comp=Company cannot be blank&";
> }
> 
> $location = "originalpage.php?$errors";
> 
> So then I redirect with the $location variable.
> 
> But instead of passing it back through the querystring, what about
> assigning the values to the $_SESSION array and simply checking for the
> existence of those values on the original form?
> 
> I think it will work fine (and even better than posting everything) but
> I'm wondering if there's something I'm not considering that makes this
> Not A Good Idea(tm)?
> 
> 
> Thanks,
> Chris.
> 
> 
> --
> Don't like reformatting your Outlook replies? Now there's relief!
> http://home.in.tum.de/~jain/software/outlook-quotefix/

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

Reply via email to