Wrox Programmer Forums
|
BOOK: Beginning PHP 5.3
This is the forum to discuss the Wrox book Beginning PHP 5.3 by Matt Doyle; ISBN: 978-0-470-41396-8
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP 5.3 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 17th, 2011, 09:42 AM
Registered User
 
Join Date: Sep 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default help about sessions

i m new in php so please help

i m working with sessions..
i have problem with sessions
here is my coding
"
<?php
session_register("admin_id");
if($_SESSION["admin_id"]=="")
{
header("location: login.php");
}

?>
"
i want to register a session

but when i use session_register function i got error ""Deprecated: Function session_register() is deprecated in C:\xampp\htdocs\xampp\c\admin\session_check.php on line 2""

help me..how can i register session without this error...
 
Old September 19th, 2011, 06:51 AM
Authorized User
 
Join Date: May 2010
Posts: 70
Thanks: 4
Thanked 6 Times in 6 Posts
Send a message via Yahoo to GeneBuchite
Default session_register

the new syntax is "session_name("admin_ID");"

Altho I believe you dont need to have that much controll of the session...

I've tried opening a specific session to no avail. the only help in the book;"Beginning PHP 5.3" is on lettting the browser select its own session.

The way I am using sessions is
Code:
 <?php session_start(); ?>
That line goes at the very TOP of the HTML page... even before the <html> tags.

Then latter you can access the session variable that were started with that particular browser... Each individual browser starts its own session. To set session variables you could use "$_SESSION['admin_ID'] = $myadmin_ID" And access the variable in other pages as "myadmin_ID = "$_SESSION['admin_ID']"

Heres hoping you don't have as much trouble learning about sessions as I did.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Sessions come and go Surre ASP.NET 1.0 and 1.1 Professional 2 April 10th, 2006 05:55 AM
Mixing classic ASP sessions with ASP.NET sessions scorpion_king General .NET 2 August 4th, 2004 08:20 AM
Sessions aeejai Beginning PHP 3 April 22nd, 2004 01:51 PM
Help sessions ittorget Pro VB 6 2 April 20th, 2004 02:18 AM
Sessions shekky1 Beginning PHP 1 June 19th, 2003 02:09 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.