On 13 Apr 2007 15:35:59 -0700, Rob M <[EMAIL PROTECTED]> wrote:
>  Does this work ?
>  $language=$_SESSION['language'];
>  if(!isset($language))....
>
>  I am curious as I would have thought the '$language =' would have made it
>  'set' ?
>  Is $language=NULL; the same as unset($language); ?

Thanks for spotting that... - Ive also spotted another one - if they
say ?language=martian  - it will still process ... (& not default to
English)...

Ive changed the script slightly (last 2 lines)
==========================================
$language=$_REQUEST{"language"};


$g=0;
if($language=="french"){$g=1;}
if($language=="english"){$g=1;}


if($g==1){
$_SESSION['language']=$language;
/* Redirect to a different page in the current directory that was requested */
$host  = $_SERVER['HTTP_HOST'];
$uri   = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
$extra = '';
header("Location: http://$host$uri/$extra";);
exit;
}

$language=$_SESSION['language'];
if($g<1){$language="english";}


==========================================

$g checks if its English or french - so im not checking an isset at all..

-- 
G
NZ community groups - [EMAIL PROTECTED]
Freecycle Auckland :-
http://groups.yahoo.com/group/AucklandFreecycle/

Reply via email to