List Info

Thread: Help with Sessions?




Help with Sessions?
user name
2006-08-18 11:55:51
After Starting a session how do you
1) Store a session ID in a MYSQL database via PHP
2) Send information from Mysql via PHP to store in Sessions
3) Send Information from Sessions via PHP to Store in Mysql


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "PHP & MySQL" group.
To post to this group, send email to phpmysqlgooglegroups.com
To unsubscribe from this group, send email to
phpmysql-unsubscribegooglegroups.com
For more options, visit this group at http://groups
.google.com/group/phpmysql
-~----------~----~----~----~------~----~------~--~---

Help with Sessions?
user name
2006-08-18 11:59:38
<?
session_start();

$UID=$_SESSION['UID'];
$PASSWD=$_SESSION['PASSWD'];

### Include Files
require_once(&quot;./conf.php");
require_once("DB.php");

### DB Connectivity
$db=&; DB::connect($DBSTR);

if(DB::isError($db)){
 &nbsp;  $retErr=&quot;DBConnectivityError- ". $db->getMessage() ." ErrorCode- ".$db->getCode();
   ; die($retErr);
}

### Fetching Service Types
$authQuery=&quot;SELECT passwd FROM admin_users WHERE admin_username='";.$UID.&quot;';";
$authRes=& $db->query($authQuery);
if(DB::isError($authRes)){
  ;  $authErr=&quot;AuthQueryError- ".$db->errorMessage().&quot; ErrorCode- ".$db->errorCode();
&nbsp; &nbsp; die($authErr);
}

$authRes->fetchInto($dbInfo);

if (!$UID || $PASSWD!=$dbInfo[0]){
 &nbsp;  die("<font color='red'>Currently, You're NOT logged In. Please Login First!!!&lt;/font><br>&lt;br>&quot;);
}
?&gt;

On 8/18/06, Flickle <hotmail.co.uk">daniellee2006hotmail.co.uk> wrote:

After Starting a session how do you
1) Store a session ID in a MYSQL database via PHP
2) Send information from Mysql via PHP to store in Sessions
3) Send Information from Sessions via PHP to Store in Mysql



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "PHP & MySQL"; group.
To post to this group, send email to phpmysqlgooglegroups.com
To unsubscribe from this group, send email to phpmysql-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/phpmysql
-~----------~----~----~----~------~----~------~--~---

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )