In message <[EMAIL PROTECTED]>, Mike Brandonisio
<[EMAIL PROTECTED]> writes
>Hi,
>
>You really only need to set $_SESSION['s_C'] to $_GET['C'] if you need to
>know what $_GET['C'] was passed from the URL in another script using
>sessions. 

It may have been set some pages ago, via a POST (and now via a SESSION).  
It may have been set on the previous page via a POST.
It may be in the URL in a deep-link, so via a GET.

And it may be required in consequent pages.

I need to cover all possibilities, because they all occur at some time
or other...




>If you are only interested in setting a local variable for use in
>the current script then I'd do this:
>
>session_start();
>header("Cache-control: private"); // IE 6 Fix.
> 
>// Has C been passed in the URL?
>// If so, change it.
>if ( isset($_GET['C']) ) {
>    $C = htmlspecialchars(trim($_GET['C']));
>}
>
>// if needed
>$_SESSION['s_C'] = $C;
>
>Mike

-- 
Pete Clark

http://www.hotcosta.com
http://www.spanishholidaybookings.com




Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to