RE: [PHP-DB] session confusion| can anyone help?

2005-08-26 Thread Bastien Koert

try defining the values as empty strings first...



bastien



From: "bo" <[EMAIL PROTECTED]>
Reply-To: "bo" <[EMAIL PROTECTED]>
To: php-db@lists.php.net
Subject: [PHP-DB] session confusion| can anyone help?
Date: Fri, 26 Aug 2005 11:42:18 +0800

here is the code for accesscontrol.php which control the access to 
protected

page, the server gives an error as of

Notice: Undefined index: uid in E:\www\signup\accesscontrol.php on line 7

Notice: Undefined index: pwd in E:\www\signup\accesscontrol.php on line 8

I tried input username and password and it will give the error as:

Access Denied
Your user ID or password is incorrect, or you are not a registered user on
this site. To try logging in again, click here. To register for instant
access, click here.

code
//
$suid = isset($_POST['suid']) ? $_POST['suid'] : $_SESSION['suid']; //line 
7
$spwd = isset($_POST['spwd']) ? $_POST['spwd'] : $_SESSION['spwd']; //line 
8


if(!isset($suid)) {
  ?>
  http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
  http://www.w3.org/1999/xhtml";>
  
 Please Log In for Access 

  
  
   Login Required 
  You must log in to access this area of the site. If you are
 not a registered user, click here
 to sign up for instant access!
  
User ID: 
Password: 

  
  
  
  
  http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
  http://www.w3.org/1999/xhtml";>
  
 Access Denied 

  
  
   Access Denied 
  Your user ID or password is incorrect, or you are not a
 registered user on this site. To try logging in again, click
 here. To register for instant
 access, click here.
  
  
  

//

Thanks.

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] session confusion| can anyone help?

2005-08-25 Thread RaJeSh VeNkAtA

session_start() should be given at the starting of the file before others
u can include anthing after the session_satrt() functon only


On Fri, 26 Aug 2005, bo wrote:


here is the code for accesscontrol.php which control the access to protected
page, the server gives an error as of

Notice: Undefined index: uid in E:\www\signup\accesscontrol.php on line 7

Notice: Undefined index: pwd in E:\www\signup\accesscontrol.php on line 8

I tried input username and password and it will give the error as:

Access Denied
Your user ID or password is incorrect, or you are not a registered user on
this site. To try logging in again, click here. To register for instant
access, click here.

code
//

 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
 http://www.w3.org/1999/xhtml";>
 
Please Log In for Access 
   
 
 
  Login Required 
 You must log in to access this area of the site. If you are
not a registered user, click here
to sign up for instant access!
 
   User ID: 
   Password: 
   
 
 
 
 
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
 http://www.w3.org/1999/xhtml";>
 
Access Denied 
   
 
 
  Access Denied 
 Your user ID or password is incorrect, or you are not a
registered user on this site. To try logging in again, click
here. To register for instant
access, click here.
 
 
 

//

Thanks.




--
*

You wouldn't know an OS if it hit you in the face ...

Linux Baby !

*

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] session confusion| can anyone help?

2005-08-25 Thread bo
here is the code for accesscontrol.php which control the access to protected 
page, the server gives an error as of

Notice: Undefined index: uid in E:\www\signup\accesscontrol.php on line 7

Notice: Undefined index: pwd in E:\www\signup\accesscontrol.php on line 8

I tried input username and password and it will give the error as:

Access Denied
Your user ID or password is incorrect, or you are not a registered user on 
this site. To try logging in again, click here. To register for instant 
access, click here.

code
//

  http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
  http://www.w3.org/1999/xhtml";>
  
 Please Log In for Access 

  
  
   Login Required 
  You must log in to access this area of the site. If you are
 not a registered user, click here
 to sign up for instant access!
  
User ID: 
Password: 

  
  
  
  
  http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
  http://www.w3.org/1999/xhtml";>
  
 Access Denied 

  
  
   Access Denied 
  Your user ID or password is incorrect, or you are not a
 registered user on this site. To try logging in again, click
 here. To register for instant
 access, click here.
  
  
  

//

Thanks.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Session confusion

2004-10-06 Thread Stuart Felenstein
Back to my multi page form again ;)

I am going to try it with Session variables .
So, one thing is confusing me.

The page requires the user to be logged in and is
being tracked via authentication.
Do I still need to do a "session_start();", at the
beginning of the form process ?

Stuart

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Session confusion :-(

2002-02-18 Thread Yasuo Ohgaki

Read current manual page.
If you still have problem, let me know what's the problem.

http://www.php.net/manual/en/ref.session.php

-- 
Yasuo Ohgaki


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Session confusion :-(

2002-02-18 Thread Adam Royle

I presume that the session is not updating because PHP does not 
automatically overwrite session variables.

You should use something like this:

$category = $HTTP_GET_VARS["category"];
session_register("category");

Session register can be called more than once, and has no effect on 
current session variables with the same name.

See if that works, and if it doesn't have a look at this...
http://www.php.net/manual/en/language.variables.predefined.php

Adam


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Session confusion :-(

2002-02-17 Thread Beau Lebens

are you always "refreshing" the session on each page dave?

i am pretty sure you need to call session_start() on every page that you
will be accessing the session-based variables.

HTH

beau

// -Original Message-
// From: Dave Carrera [mailto:[EMAIL PROTECTED]]
// Sent: Saturday, 16 February 2002 10:56 PM
// To: php List
// Subject: [PHP-DB] Session confusion :-(
// 
// 
// Hi All
// 
// I am send variable values via set links i.e.:
// 
// http://domian_name.com/page.php?category=1
// 
// http://domian_name.com/page.php?category=2
// 
// http://domian_name.com/page.php?category=3
// 
// Etc etc
// 
// The value is sent to a session. THIS WORKS BUT.
// 
// If I click on the first link session variable category is set to 1.
// 
// But if I then click on the send , third, forth or whatever link
// Session variable is still set to 1.
// 
// I have tried
// 
// If(ISSET($category)){
// Unset($category);
// Session_register(category) // hoping it would accept the new 
// sent value.
// }
// 
// No Go
// 
// Can anyone throw some light on this please.
// 
// As Always I am grateful for any pointers or exampled help
// 
// :-)
// 
// Dave Carrera
// Php / MySql Development
// Web Design
// Site Marketing
// http://www.davecarrera.com
//  
// 
// 
// 
// -- 
// PHP Database Mailing List (http://www.php.net/)
// To unsubscribe, visit: http://www.php.net/unsub.php
// 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Session confusion :-(

2002-02-16 Thread Dave Carrera

Hi All

I am send variable values via set links i.e.:

http://domian_name.com/page.php?category=1

http://domian_name.com/page.php?category=2

http://domian_name.com/page.php?category=3

Etc etc

The value is sent to a session. THIS WORKS BUT.

If I click on the first link session variable category is set to 1.

But if I then click on the send , third, forth or whatever link
Session variable is still set to 1.

I have tried

If(ISSET($category)){
Unset($category);
Session_register(category) // hoping it would accept the new sent value.
}

No Go

Can anyone throw some light on this please.

As Always I am grateful for any pointers or exampled help

:-)

Dave Carrera
Php / MySql Development
Web Design
Site Marketing
http://www.davecarrera.com
 



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php