Reply to Login lgout and login without closing session gives redirection error

Your name:

Reply:


Posted by Peter Brown on 06/16/05 00:54

Hello!

I am stepping through a text book that sets up different websites. The
one I am testing is user registration.

I set up the scripts and this is what I observe:

Login (verifying against a mysql db) - no problem.
Logout - no problem.

Close the browser and try again - no problem.

Login > Logout > Login WITHOUT closing browser I get:

An error occurred while loading http://login.php when it should redirect
me to http://localhost/index.php.

I read somewhere on the news group that the
header("Location: http://" . $_SERVER['HTTP_HOST'] . dirname
($_SERVER['PHP_SELF']) . "/index.php") (in my example code) is called
once and so the error?

The logout.php destroys the $_SESSION variables, session itself and any
cookies so I thought it would be "like new" the second time around?

It appears to be linked to sessions but don't know enough to know how to
correct.

Please help,

Thank you,
Peter Brown

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация