Forums

PHP

This topic is locked

Login works from one page but not from another

Posted 17 Jan 2006 14:09:08
1
has voted
17 Jan 2006 14:09:08 Magnus von Bromsen posted:
Hello
I have two different pages with a Login Behavior (and one page with Restrict User). From one of the pages the login works as supposed, but from the other I always redirects to the ErrorLogin-page.

The not-working page also have another recordset ("rsNews".

The web server is Windows (I think) and PHP/MySQL. But testing exactly the same pages on two other web servers (Unix) both pages works perfectly. Solutions?

Well the ISP support told me that there is something wrong with the PHP code and suggested: "...print something to the screen before redirect to appropriated page according to the authorization..."

How do I do that?

One other strange thing is in the URL: When using the right user/pw on the faulty page, and redirects to ErrorLogin, the URL in the browser window is this:

www.t-c.se/ErrorLogin.php?accesscheck=%2Fmembers%2Findex.php

But trying to login with wrong user/pw this is the URL:

www.t-c.se/ErrorLogin.php

So, two questions:
1. How do I print something to the screen before redirect?
2. Another (better?) solution?

//Magnus von Bromsen

Reply to this topic