Prob with sessions

From: Date: Mon, 06 Nov 2000 08:30:02 +0000
Subject: Prob with sessions
Groups: php.general 
Request: Send a blank email to php-general+get-23859@lists.php.net to get a copy of this message
Hi, I have a prob with sessions: If I have a login pg, as <?php session_start(); session_register("SESSION"); $SESSION[sid] = SID; if ($login) { $CFG->username = $user; $CFG->password = $pass; $CFG->dbhost='localhost:C:\Systems\Rpi\Inprorpi.gdb'; $connection = ibase_pconnect($CFG->dbhost,$CFG->username,$CFG->password) or die ("Couldn't connect to server"); echo '<font face="verdana" size=2><strong>You have logged onto the database.</STRONG><br><br>MENU OPTIONS: <br><br>1)<a href="frameset_display.htm">Insert new client</a><br><br>2)<a href="client_search.php">Search for existing client</a></font><br><br> '; } else { ?> <form name="form1" method="post" action="login.php?<?php echo $SID; ?>"> <input type="text" name="user"> <input type="password" name="pass"> <input type="submit" name="login" value="Login"> I want to pass the username and password in a session throughout the application firstly does this mean I don't have to connect to the database on each pg, and secondly, how wd the syntax look on each pg to use the sesson info? Thanx!

« previous php.general (#23859) next »