i think ronaldos hat trick proves who is the best,,
the reason i have 4 pages is just for illustration purposes to see if the sessions are actually working.
this is the code for the main page, this is the one which is displaying the new session_id. the page that this calls displays the old session id.
<?php
session_start();
$username=$_POST["user"];
$password=$_POST["pass"];
session_register('username');
$_SESSION['username'] = $username;
session_register('password');
$_SESSION['password'] = $password;
$db="(DESCRIPTION=(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = RICHARD-2J7P3XV)(PORT = 1521)))(CONNECT_DATA=(SID=test)))";
$c1=ocilogon("ADAMS","password",$db);
$count=0;
$query="select * from david.customer_registration where USERNAME='$username' and PWORD1='$password'";
$stmt=ociparse($c1,$query);
ociexecute($stmt);
while (ocifetch($stmt)){
$count++;
$custid=ociresult($stmt,"CUST_ID");
session_register('custid');
$_SESSION['custid'] = $custid;
$fname=ociresult($stmt,"F_NAME");
session_register('fname');
$_SESSION['fname'] = $fname;
$lname=ociresult($stmt,"L_NAME");
session_register('lname');
$_SESSION['lname'] = $lname;
$gender=ociresult($stmt,"GENDER");
session_register('gender');
$_SESSION['gender'] = $gender;
$address=ociresult($stmt,"ADDR");
session_register('address');
$_SESSION['address'] = $address;
$city=ociresult($stmt,"CITY");
session_register('city');
$_SESSION['city'] = $city;
$country=ociresult($stmt,"COUNTRY");
session_register('country');
$_SESSION['country'] = $country;
$mobile=ociresult($stmt,"MOBILE");
session_register('mobile');
$_SESSION['mobile'] = $mobile;
$mail=ociresult($stmt,"MAIL");
session_register('mail');
$_SESSION['mail'] = $mail;
$mother=ociresult($stmt,"MOTHERSNAME");
session_register('mother');
$_SESSION['mother'] = $mother;
$sms=ociresult($stmt,"SMS");
session_register('sms');
$_SESSION['sms'] = $sms;
$smsup=ociresult($stmt,"SMSUPDATES");
session_register('smsup');
$_SESSION['smsup'] = $smsup;
}
if($count<=0){?>
<meta http-equiv="refresh" content="0; url=loginfail.htm">
<?php
}
else if($count>=1){?>
<meta http-equiv="refresh" content="0; url=person.php">
<?php
}
ocilogoff($c1);
?>
<html>
<body bgcolor="#003366">
</html>
this code is for the page that the avove code is displying,
<?php
session_start();
echo session_id()."<br>\n";
echo $SESSION['username']."<br>\n";
echo $SESSION['address']."<br>\n";
?>
it displays an old session id and the username and password that the old session contained.