Please try this code : session_start(); $_SESSION["cust_id"]=$rec_cust[0]; $_SESSION["cust_nm"]=$rec_cust[1]; $_SESSION["cust_nm"]=$rec_cust[2]; And in another page you want to access this session variable use this code session_start(); //this code must appear before any output to html <?php > if(isset($cust_id)) > { > #display page, if user had been login > ........ > ........ > }else > { > session_destroy(); > echo "Sorry,You are not login yet."; > } ----- Original Message ----- From: "deffleo" <deffleo@xxxxxxxxx> To: <php-objects@xxxxxxxxxxxxxxx> Sent: Saturday, June 18, 2005 19:39 Subject: Hi friends, can you help. Session and print out data > Hi friends,can you help me. i have 2 problem in php scripting. > > 1.when i use session and i want to redirect user to another page. > ---------------------------------------------------------------- > this script is part of "check_user.php". > > $HTTP_SESSION_VARS["cust_id"]=$rec_cust[0]; > $HTTP_SESSION_VARS["cust_nm"]=$rec_cust[1]; > $HTTP_SESSION_VARS["passwd"]=$rec_cust[2]; > session_register("cust_id"); > > #Redirect customer to book page > echo "<meta http-equiv='refresh' content='0;url=../show_buku.php'>"; > > and in another page i check the session, why the variable of current > session is alway say empty. > > this script is part of "show_buku.php". > i check a session like this : > <?php > if(isset($HTTP_SESSION_VARS["cust_id"])) > { > #display page, if user had been login > ........ > ........ > }else > { > session_destroy(); > echo "Sorry,You are not login yet."; > } > > but the result of check the session is alway display : > > ..... > Sorry,You are not login yet. > > -------------------------------------------------------------------- > 2.how to print out money with digit grouping in php. like this sample : > > $money=10000; > > input : $money or can take from MySQL record table; > the output that i want is 10.000; > > .......+---------------------+ > | Price of Book | > +---------------------+ > |10.000 | > > note : the script that i want is using php script no in MySQL Query > Language. > > Thanks for your help. > > > > > PHP Data object relational mapping generator - http://www.meta-language.net/ > Yahoo! Groups Links > > > > > > > PHP Data object relational mapping generator - http://www.meta-language.net/ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-objects/ <*> To unsubscribe from this group, send an email to: php-objects-unsubscribe@xxxxxxxxxxxxxxx <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/