RE: [PHP] HTTP header question.

From: Date: Mon, 30 Jul 2001 02:18:49 +0000
Subject: RE: [PHP] HTTP header question.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-60144@lists.php.net to get a copy of this message
All I want to do is output "Authentication failed" above the form if they type in invalid credentials. I want to do it by passing a header that contains the same information as if there were a form submitted that contained a field name "failed" and value "true". Aside from this one application, I can think of many other places where this would be valuable. Am I being unclear? It seems that my question was not understood. Please let me know so I can try to re-explain. Thanks, Ben -----Original Message----- From: Dave VanAuken [mailto:dave@hawk-systems.com] Sent: Sunday, July 29, 2001 7:16 PM To: Ben Bleything; php-general@lists.php.net Subject: RE: [PHP] HTTP header question. what is the logic behind requiring the header? for example, to avoid using cookies and yet ensuring security, we pass a loginkey for all pages. every page has include('securitycheck.php'); which parses the loginkey, uncompresses/decode it to get the userid and timestamp, and prompts for a login if the last access was too old (say 10 min). the security check displays the login screen if no key is available or key is expired, and exits, preventing display of the remainder of the page ifthe key is valid, it updates the key for the current time (reset the expire counter so to speak) and displays the page iwth all URL's conyaining the encoded key. you end up with one additional line of code per page (which we include as part of site template) unless you are looking for something else entirely and I am missing the point (entirely possible). Dave >-----Original Message----- >From: Ben Bleything [mailto:bleythib@ucs.orst.edu] >Sent: Sunday, July 29, 2001 8:48 PM >To: php-general@lists.php.net >Subject: [PHP] HTTP header question. > > >Hey all, > >I want to craft a header such that it seems to the page that data has >been POST'ed to it... Here's the situation: I'm writing a login page to >my application, and if they log in incorrectly, I want the page to >redisplay, but I want it to throw out an error message. I'm currently >doing it by > > header("Location: login.php?failure=true"); > >but I'd like to make it transparent. Any ideas? > >Thanks, >Ben > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net >For additional commands, e-mail: php-general-help@lists.php.net >To contact the list administrators, e-mail: php-list-admin@lists.php.net > > >

« previous php.general (#60144) next »