Here what I found in the PHP script.
// SESSION CONTROL AND VALIDATION
if ($session_id=="") {
unset($session_id);
$session_id = generate_session_id($aid);
setcookie("session_id",$session_id,time()+864003);
} else {
// CHECK THAT THE LOGIN SESSION HASN'T EXPIRED, AND THAT IT IS A VALID SESSION...
if (!validate_session($session_id)) {
// FAILED, CREATE A NEW RECORD
$old_sess = $session_id;
unset($session_id);
$session_id = generate_session_id($aid);
setcookie("session_id",$session_id,time()+864003);
}
}
// STORE THE AFFILIATE TRACKING COOKIE IF SENT...
if (isset($aid) && ($aid != "")) {
setcookie("aid",$aid,time()+86400*360);
}
// STORE THE COUPON AS A COOKIE
if (($action=="coupon_add") && (validate_coupon($coupon))) {
setcookie("coupon",$coupon,time()+86400);
}
Now the html file. This is the first sreen called when a custome comes to site. If a customer comes from the same ip, it gives them the same session Id.
<form method="post" action="">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="field_t">
<tr>
<td width="31"> <b> www.
<input type="hidden" name="page" value="signup_2">
<input type="hidden" name="session_id" value="<? echo $session_id ?>">
</b></td>
<td width="182"> <b>
<input type="text" name="desired_domain" class="fields" size="26" maxlength="64">
</b> </td>
<td width="541">
<input type="submit" name="search" value="Go!" class="fields">
</td>
<td width="489"> </td>
</tr>
<tr>
<td width="31"> </td>
<td width="182">e.g. <i><b>search.com </b></i>or<i><b> search </b></i></td>
<td width="541"> </td>
<td width="489"> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="1" cellpadding="1" class="field_t">
<tr>
<td height="20"><a href="?page=domain_suggest&session_id=<? echo $session_id ?>"></a></td>
</tr>
</table>
</form>
Is there a way to make the ids timeout or be removed if the browser closes.
Thanks
RobM