If you try to do this and find that it's barfing out the headers, use
this:

include "include/class.http_post.php";
$poster = new http_post();
$poster->set_action("http://$HTTP_HOST$RAMS_ROOT/login.php";);
$poster->set_element("failure",true);
$poster->set_enctype("multipart/form-data");
$return = $poster->send(0);
echo eregi_replace("^HTTP.*html>", "", $return);

Just thought I'd stick a little hint along with it.  Sorry for the
long-windedness of this thread =>

Ben

-----Original Message-----
From: Ben Bleything [mailto:[EMAIL PROTECTED]] 
Sent: Monday, July 30, 2001 4:55 PM
To: [EMAIL PROTECTED]
Cc: 'Matt Rogers'; 'Matt Greer'
Subject: [PHP] THE END OF the HTTP header question.

We can all shut the hell up about this now!  It's wonderful!

Found a class on px.sklar.com that does what I need.  It may not be the
most elegant solution in some people's opinion, but I'm happy with it.
Do with it as you will.

http://px.sklar.com/code-pretty.html?code_id=313

Still curious about what everyone thinks =>

Ben

-----Original Message-----
From: Ben Bleything [mailto:[EMAIL PROTECTED]] 
Sent: Monday, July 30, 2001 4:16 PM
To: 'Dave'; [EMAIL PROTECTED]
Subject: 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]

Reply via email to