|
| |
php:coookie var set in hp do not print in a subpage of application ?
View related threads:
(in this forum
| in all forums)
|
Logged in as: Guest
|
|
|
lsfphelpls
Posts: 447 Joined: 3/16/2005 Status: offline
|
php:coookie var set in hp do not print in a subpage of ... - 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
Posts: 447 Joined: 3/16/2005 Status: offline
|
RE: php:coookie var set in hp do not print in a subpage... - 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); ?>
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|