php:coookie var set in hp do not print in a subpage of application ? (Full Version)

All Forums >> [Web Development] >> General Web Development



Message


lsfphelpls -> php:coookie var set in hp do not print in a subpage of application ? (3/18/2008 11:50:20)

http://www.paphoscarhire.com/index.php?aff=338297
I set in hp above the
<?php
session_start( );
// if (!isset($_SESSION['affiliate']) || $_SESSION['affiliate'] == Null) $affiliate = '10000';  //default value:  $affiliate = '10000';  //default value 
if (isset($_COOKIE['aff']) && ($_COOKIE['aff'] != Null))
{
  $affiliate = $_COOKIE['aff']; 
} 
else if (isset($_GET['aff']) && ($_GET['aff'] != Null)) { 
  $affiliate = $_GET['aff'];   //  $affiliate = "{$_GET['aff']}";
  setcookie("aff", $affiliate, time()+60*60*24*90, "/");    //  3 months // $_COOKIE['aff'] = $affiliate ;
}
else {
 $affiliate = '10000' ;
 setcookie("aff", $affiliate, time()+60*60*24*90, "/");  
}

$_SESSION['affiliate'] = $affiliate ;

?>

but after I call to a webpage in the application[booking form https://pafoscarhire.com/php/booknow-euro.php ], the
<?php
$affil = $_COOKIE['aff'];
echo $affil;   // $_COOKIE['aff'];    // $email_text;
?>

I do not get a value for
$_COOKIE['aff'];
how to test what value this var has ? how to debug ? the https:// page can echo cookie vars ? may have $_COOKIE['aff']="" ?




lsfphelpls -> RE: php:coookie var set in hp do not print in a subpage of application ? (3/22/2008 14:31:40)

I used echos for each subsequent page of the application but seems cookie or session var
<?php echo $_SESSION['affiliate'] . ", " . $affiliate . ", " . $_COOKIE['aff']; ?>
do not transmit over the https:// page, well ?

answer and:
what means the %2$s,%1$d,...or $%.2f, below ? are regexp ? what chapter of a php textbook to find about these ?
<?php
$format = 'The %2$s contains %1$d monkeys.
That is a nice %2$s full of %1$d monkeys.';
printf($format, $num, $location);
?>




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.046875