[PHP] Re: http header script to stimluate upload with drag and drop??
I have written lot of http header scripts myself, so I'm familiar with what they are used for. Scott "M. Sokolewicz" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Scott Fletcher wrote: > > Hi! > > > > I wonder is is it possible to have an http header that would stimluate > headers don't "stimulate". They are simple "messages", a bit of text > with no real meaning until the browser/server/whatever gives it meaning > locally to itself. > > > files/folders upload via dragging over to the browser window? > No. >If so then > > what are the sample functions or scripts that make this possible... > headers, functions and script don't have much to do with eachother. I > would suggest reading some documentation about headers to actually > understand what you're talking about. > > Please don't take that wrong, I'm not trying to offend you, but I really > think you should at least educate yourself about such things a bit > before asking. > > > > Thanks, > > Scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: http header script to stimluate upload with drag and drop??
Scott Fletcher wrote: Hi! I wonder is is it possible to have an http header that would stimluate headers don't "stimulate". They are simple "messages", a bit of text with no real meaning until the browser/server/whatever gives it meaning locally to itself. files/folders upload via dragging over to the browser window? No. If so then what are the sample functions or scripts that make this possible... headers, functions and script don't have much to do with eachother. I would suggest reading some documentation about headers to actually understand what you're talking about. Please don't take that wrong, I'm not trying to offend you, but I really think you should at least educate yourself about such things a bit before asking. Thanks, Scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: http header
"Gabe" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Is the following code the best way to redirect someone to a different > page using PHP? > > header("Location: http://www.yahoo.com";); > ?> >From personal experience I can recommend putting "exit;" behind a header() redirect to absolutely make sure that no code is executed afterwards in the script: header("Location: http://www.yahoo.com";); exit; Without "exit;" the header redirect soemtimes didn't work for me. Regards, Torsten Roehr > > I looked for a "redirect" function of some kind and didn't come up with > anything. Just curious what the consensus is... > > Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: http header
Brandon Holtsclaw wrote: Thanks for the ideas. The header option will work, I was just curious. or you could try something like : window.location.href='http://www.slashdot.org' and / or window.location.href='http://www.slashdot.org'"; ?> Brandon Holtsclaw [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: http header
or you could try something like : window.location.href='http://www.slashdot.org' and / or window.location.href='http://www.slashdot.org'"; ?> Brandon Holtsclaw [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: http header?
Which of them? A webserver sents quite many variables, and you can access almost everyone of them with PHP. So perhaps giving some specifics? -- Richard, oblivion creations http://oblivion.lunamorena.net [EMAIL PROTECTED] +4+ (0) 736 849 531 for sure contact.. "Marcbey" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > hello php guys, > > how can i get the http header ? > > > greetings marc > > > -- > --- > magic garden GmbH - Agentur für Informationsarchitektur > > Hermannstr. 15 - 70178 Stuttgart (Am Feuersee) > > www.magic-garden.de ¦ [EMAIL PROTECTED] > > Tel. (07 11) 619 57-42 ¦ Fax (07 11) 615 01 38 > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: HTTP header question.
>Matt has it right. I'm trying to go for a more professional looking >thing... and I do want it to display a notice when the login fails. I >have thought of another way to do it... but it's not pretty, so I'm >still open to suggestions. A while back I posted a pseudo-code >explanation of what it is... attached to this e-mail is the actual >page... Hopefully it will either shed some light on my predicament or >help you all to alert me to any major errors that are probably hiding in >there => Attached is your code modified to my way of thinking (not that I am right, just a different way of doing things that will not require all the excessive code for the header stuff). I always try and limit the use of header calls to tasks that actually have to move to another page. As such this page does everything internally now (and has been commented to show the logic train). IMO it is far more clear, concise, and compact than calling to external classes or including lots of header code... which as I believe I've shown you can do without and still not have ugly page descriptors. Review and do with as you wish. Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: HTTP header question.
Ahh, and a bit of clarification before you read the code, the page posts to itself => Ben -Original Message- From: Dave [mailto:[EMAIL PROTECTED]] Sent: Monday, July 30, 2001 8:05 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] Re: HTTP header question. below >Some of the original message: >> still don't see the need to pass as a header... >> >> you avoid the http://his.website.com/rams/login.php?failure=true as you >just get >> login.php each time as far as the displayed URL. >> >> my opinion, let the scripting handle all the logic and ease off the header >> functions. > >The whole idea behind his point is so the user cannot see what's going on >behind the scenes. It's just another method of making it look more >professional. I understand that much, but don't see why he would want to do a header('filename') redirection at all in case of a failure? >It's not really a case of headers, Ben just wanted to know if it is at all >possible to use PHP to keep the URL from showing the query as opposed to >having to use JavaScript or anything else. > >People kept giving him different solutions to something he didn't need >solutions for -- he already had the verification and if-then's down in the >script... He just wanted one little thing about making the browser show only >the simple URL and not let it change. That's all. =) Understood. My point is that he appears to be using the wrong tool for the job, and solving a problem where if done otherwise would not exist. My impression is he is posting a login to a page and redirecting back to the login page if it fails with a "failure notice". Rather than that, my suggestion would be to keep the login page seperate, have it do the authentication, and only move from that page when it succeeds. This also allows him to reuse this code as necessary, and removes the need for any passing of header information, thus no problem. >What a confusing thread, eh? hehe.. At least if someone wants to read >something funny and understands the American Language, this is the thread to >read... I think if he had posted the code from tha pages he is using, that would have clarified things greatly. My mistake is taking his problem, and suggesting that he is trying to do a big workaround for a problem that if done differently wouldn't exist. Why reinvent the wheel. :) Cheers Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: HTTP header question.
If you all would like, I can post my code... I'm still looking for a solution. Matt has it right. I'm trying to go for a more professional looking thing... and I do want it to display a notice when the login fails. I have thought of another way to do it... but it's not pretty, so I'm still open to suggestions. A while back I posted a pseudo-code explanation of what it is... attached to this e-mail is the actual page... Hopefully it will either shed some light on my predicament or help you all to alert me to any major errors that are probably hiding in there => Thanks a pile, Ben -Original Message- From: Dave [mailto:[EMAIL PROTECTED]] Sent: Monday, July 30, 2001 8:05 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] Re: HTTP header question. below >Some of the original message: >> still don't see the need to pass as a header... >> >> you avoid the http://his.website.com/rams/login.php?failure=true as you >just get >> login.php each time as far as the displayed URL. >> >> my opinion, let the scripting handle all the logic and ease off the header >> functions. > >The whole idea behind his point is so the user cannot see what's going on >behind the scenes. It's just another method of making it look more >professional. I understand that much, but don't see why he would want to do a header('filename') redirection at all in case of a failure? >It's not really a case of headers, Ben just wanted to know if it is at all >possible to use PHP to keep the URL from showing the query as opposed to >having to use JavaScript or anything else. > >People kept giving him different solutions to something he didn't need >solutions for -- he already had the verification and if-then's down in the >script... He just wanted one little thing about making the browser show only >the simple URL and not let it change. That's all. =) Understood. My point is that he appears to be using the wrong tool for the job, and solving a problem where if done otherwise would not exist. My impression is he is posting a login to a page and redirecting back to the login page if it fails with a "failure notice". Rather than that, my suggestion would be to keep the login page seperate, have it do the authentication, and only move from that page when it succeeds. This also allows him to reuse this code as necessary, and removes the need for any passing of header information, thus no problem. >What a confusing thread, eh? hehe.. At least if someone wants to read >something funny and understands the American Language, this is the thread to >read... I think if he had posted the code from tha pages he is using, that would have clarified things greatly. My mistake is taking his problem, and suggesting that he is trying to do a big workaround for a problem that if done differently wouldn't exist. Why reinvent the wheel. :) Cheers Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: HTTP header question.
below >Some of the original message: >> still don't see the need to pass as a header... >> >> you avoid the http://his.website.com/rams/login.php?failure=true as you >just get >> login.php each time as far as the displayed URL. >> >> my opinion, let the scripting handle all the logic and ease off the header >> functions. > >The whole idea behind his point is so the user cannot see what's going on >behind the scenes. It's just another method of making it look more >professional. I understand that much, but don't see why he would want to do a header('filename') redirection at all in case of a failure? >It's not really a case of headers, Ben just wanted to know if it is at all >possible to use PHP to keep the URL from showing the query as opposed to >having to use JavaScript or anything else. > >People kept giving him different solutions to something he didn't need >solutions for -- he already had the verification and if-then's down in the >script... He just wanted one little thing about making the browser show only >the simple URL and not let it change. That's all. =) Understood. My point is that he appears to be using the wrong tool for the job, and solving a problem where if done otherwise would not exist. My impression is he is posting a login to a page and redirecting back to the login page if it fails with a "failure notice". Rather than that, my suggestion would be to keep the login page seperate, have it do the authentication, and only move from that page when it succeeds. This also allows him to reuse this code as necessary, and removes the need for any passing of header information, thus no problem. >What a confusing thread, eh? hehe.. At least if someone wants to read >something funny and understands the American Language, this is the thread to >read... I think if he had posted the code from tha pages he is using, that would have clarified things greatly. My mistake is taking his problem, and suggesting that he is trying to do a big workaround for a problem that if done differently wouldn't exist. Why reinvent the wheel. :) Cheers Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: HTTP header question.
Some of the original message: > still don't see the need to pass as a header... > > you avoid the http://his.website.com/rams/login.php?failure=true as you just get > login.php each time as far as the displayed URL. > > my opinion, let the scripting handle all the logic and ease off the header > functions. The whole idea behind his point is so the user cannot see what's going on behind the scenes. It's just another method of making it look more professional. It's not really a case of headers, Ben just wanted to know if it is at all possible to use PHP to keep the URL from showing the query as opposed to having to use JavaScript or anything else. People kept giving him different solutions to something he didn't need solutions for -- he already had the verification and if-then's down in the script... He just wanted one little thing about making the browser show only the simple URL and not let it change. That's all. =) What a confusing thread, eh? hehe.. At least if someone wants to read something funny and understands the American Language, this is the thread to read... --- -- M&D Creations - Matt Rogers - Web Design Dept. - [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: HTTP header question.
still don't see the need to pass as a header... '; #will display login so user doesnt' have to retype } ?> you avoid the http://his.website.com/rams/login.php?failure=true as you just get login.php each time as far as the displayed URL. my opinion, let the scripting handle all the logic and ease off the header functions. >-Original Message- >From: Matt Rogers [mailto:[EMAIL PROTECTED]] >Sent: Sunday, July 29, 2001 11:00 PM >To: [EMAIL PROTECTED] >Subject: [PHP] Re: HTTP header question. > > >I don't know how to solve your problem, but I do know what you are talking >about.. People just aren't understanding. > >All he wants is if you go to "login.php" in your browser, the Location will >show: > >http://his.website.com/rams/login.php > >Okay? Got it? NOW... If you attempt to log in and give the form an >INCORRECT login, he wants to SOMEHOW (and currently trying by headers) wants >the location to show this: > >http://his.website.com/rams/login.php > >AND NOT: > >http://his.website.com/rams/login.php?failure=true > >Is that hard to understand? >I hope I have helped to some degree. >-- >--- >-- M&D Creations >- Matt Rogers >- Web Design Dept. >- [EMAIL PROTECTED] >"Ben Bleything" <[EMAIL PROTECTED]> wrote in message >01c11891$447271c0$0201a8c0@allegro">news:01c11891$447271c0$0201a8c0@allegro... >> 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: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: HTTP header question.
The easiest solution is to create the failure variable as a session variable. -Stewart -Original Message- From: Matt Rogers [mailto:[EMAIL PROTECTED]] Sent: 30 July 2001 04:00 To: [EMAIL PROTECTED] Subject: [PHP] Re: HTTP header question. I don't know how to solve your problem, but I do know what you are talking about.. People just aren't understanding. All he wants is if you go to "login.php" in your browser, the Location will show: http://his.website.com/rams/login.php Okay? Got it? NOW... If you attempt to log in and give the form an INCORRECT login, he wants to SOMEHOW (and currently trying by headers) wants the location to show this: http://his.website.com/rams/login.php AND NOT: http://his.website.com/rams/login.php?failure=true Is that hard to understand? I hope I have helped to some degree. -- --- -- M&D Creations - Matt Rogers - Web Design Dept. - [EMAIL PROTECTED] "Ben Bleything" <[EMAIL PROTECTED]> wrote in message 01c11891$447271c0$0201a8c0@allegro">news:01c11891$447271c0$0201a8c0@allegro... > 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: HTTP header question.
On Monday 30 July 2001 03:10, Ben Bleything wrote: > I understand that the POST operation stores the data from the form in > the message headers... I just need to know which headers, so I can use > that information to write my own... I basically want to make it seem as > if the $failure var was POST'ed back to the page. > > I'm having NO luck whatsoever with the HTTP RFC's... too thick => Read them nevertheless. A POST is a request from the client (browser) to the webserver. PHP's header () is used to send a response header from the webserver to the browser. Wrong way for what you want to do. header ("Location: http://XY";) works (if there's a header ('302: Moved Temporarily'); before it), because it just tells the browser "don't use this URL at the moment - try XY instead" and the browser initiates a new request based on that. -- Christian Reiniger LGDC Webmaster (http://lgdc.sunsite.dk/) This is JohnC IMHO, I compaired tri-word groupings here and in his plan and got a good match. - /. posting discussing the likelihood that an AC post that claimed to be posted by John Carmack during his honeymoon (and having the login info at home) was actually from him. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: HTTP header question.
I don't know how to solve your problem, but I do know what you are talking about.. People just aren't understanding. All he wants is if you go to "login.php" in your browser, the Location will show: http://his.website.com/rams/login.php Okay? Got it? NOW... If you attempt to log in and give the form an INCORRECT login, he wants to SOMEHOW (and currently trying by headers) wants the location to show this: http://his.website.com/rams/login.php AND NOT: http://his.website.com/rams/login.php?failure=true Is that hard to understand? I hope I have helped to some degree. -- --- -- M&D Creations - Matt Rogers - Web Design Dept. - [EMAIL PROTECTED] "Ben Bleything" <[EMAIL PROTECTED]> wrote in message 01c11891$447271c0$0201a8c0@allegro">news:01c11891$447271c0$0201a8c0@allegro... > 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: HTTP header question.
That seems much more complicated than I need. I understand that the POST operation stores the data from the form in the message headers... I just need to know which headers, so I can use that information to write my own... I basically want to make it seem as if the $failure var was POST'ed back to the page. I'm having NO luck whatsoever with the HTTP RFC's... too thick => Thanks, Ben -Original Message- From: Philip Murray [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 29, 2001 6:06 PM To: Ben Bleything Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Re: HTTP header question. Quoting Ben Bleything <[EMAIL PROTECTED]>: > I'm fully aware of that. The issue is not the refreshing (that works > fine)... > > Here's a little more detail: > > if(!$login) > { > if($failure) > // complain > > // show the form > } > else > { > if(user_is_good) > // take them to the next page > else > // complain > } > > The //complain in the else section is this: > > Unset($login); // so it won't try to authenticate again > $failure = true; // so the form knows to complain > header("Location: login.php"); > > Okay. So, just to clear things up, I'm not sending anything before > this. This happens IMMEDIATELY after the user clicks on Submit... > > What I'm looking for is a way to do this such that the user does not see > anything more than http://host.name.here/rams/login.php in their address > bar when it failed... doing it the way I show above does not work, and > the alternative ( header("Location: login.php?failure=true") ) does not > satisfy my requirement. > > So... anybody else? > - How about using javascript? For example [...any other data you want...] <!-- document.forms[0].submit() // or document.forms['loginFailure'].submit(); // --> It's untested, but you get the idea. Cheers -- - -- - - - Philip Murray - [EMAIL PROTECTED] http://www.open2view.com - Open2View.com - - -- - - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: HTTP header question.
> What I'm looking for is a way to do this such that the user does not see > anything more than http://host.name.here/rams/login.php in their address > bar when it failed... Doesn't using a form with its method set to post send the variables through headers? If that's the case, couldn't you manually set those headers yourself using header()? I'm curious about this myself, but so far I've not been able to find any info on the web. Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: HTTP header question.
Quoting Ben Bleything <[EMAIL PROTECTED]>: > I'm fully aware of that. The issue is not the refreshing (that works > fine)... > > Here's a little more detail: > > if(!$login) > { > if($failure) > // complain > > // show the form > } > else > { > if(user_is_good) > // take them to the next page > else > // complain > } > > The //complain in the else section is this: > > Unset($login); // so it won't try to authenticate again > $failure = true; // so the form knows to complain > header("Location: login.php"); > > Okay. So, just to clear things up, I'm not sending anything before > this. This happens IMMEDIATELY after the user clicks on Submit... > > What I'm looking for is a way to do this such that the user does not see > anything more than http://host.name.here/rams/login.php in their address > bar when it failed... doing it the way I show above does not work, and > the alternative ( header("Location: login.php?failure=true") ) does not > satisfy my requirement. > > So... anybody else? > - How about using javascript? For example [...any other data you want...] It's untested, but you get the idea. Cheers -- - -- - - - Philip Murray - [EMAIL PROTECTED] http://www.open2view.com - Open2View.com - - -- - - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: HTTP header question.
I'm fully aware of that. The issue is not the refreshing (that works fine)... Here's a little more detail: if(!$login) { if($failure) // complain // show the form } else { if(user_is_good) // take them to the next page else // complain } The //complain in the else section is this: Unset($login); // so it won't try to authenticate again $failure = true; // so the form knows to complain header("Location: login.php"); Okay. So, just to clear things up, I'm not sending anything before this. This happens IMMEDIATELY after the user clicks on Submit... What I'm looking for is a way to do this such that the user does not see anything more than http://host.name.here/rams/login.php in their address bar when it failed... doing it the way I show above does not work, and the alternative ( header("Location: login.php?failure=true") ) does not satisfy my requirement. So... anybody else? Ben -Original Message- From: Jacques [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 29, 2001 5:58 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: HTTP header question. "Ben Bleything" <[EMAIL PROTECTED]> wrote in message 01c11891$447271c0$0201a8c0@allegro">news:01c11891$447271c0$0201a8c0@allegro... > 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 You cannot send ANY text or html tag (even a space ) before usin header function. If you have to get something displayed. I suggest to use then : echo ""; Regards, Jacques -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: HTTP header question.
"Ben Bleything" <[EMAIL PROTECTED]> wrote in message 01c11891$447271c0$0201a8c0@allegro">news:01c11891$447271c0$0201a8c0@allegro... > 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 You cannot send ANY text or html tag (even a space ) before usin header function. If you have to get something displayed. I suggest to use then : echo ""; Regards, Jacques -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: http header
Hi, >Dear all folks, >I want to get the url of the previous page that my visitor came from. Is this correct to use http_header? Or what function that will help me >do this job? the variable $HTTP_REFERER will do the job but not all browsers support it. Manual -> Variables -> predefined variables for more info. cheers Johannes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: http header
It's called HTTP_REFERER PHP document: HTTP_REFERER The address of the page (if any) which referred the browser to the current page. This is set by the user's browser; not all browsers will set this. "Jack" <[EMAIL PROTECTED]> wrote in message 05c201c1098e$ee947fc0$[EMAIL PROTECTED]">news:05c201c1098e$ee947fc0$[EMAIL PROTECTED]... Dear all folks, I want to get the url of the previous page that my visitor came from. Is this correct to use http_header? Or what function that will help me do this job? Jack [EMAIL PROTECTED] "Love your enemies, it will drive them nuts" -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]