Forum Moderators: coopster

Message Too Old, No Replies

Sending/displaying POST information without using forms

         

LiNx88

1:02 am on Nov 10, 2005 (gmt 0)

10+ Year Member



Hello,

What I need to do is build onto an existing login form, using POST forms. I would like to have to have to access the existing code, so what I ultimately have to do is write a PHP script that will spoof a form POST.

I have found 2-3 different examples, however none of these will send the post, and then go to that page. All that these scripts do is send the post, and keep you on the existing page.

The return from the form cannot be displayed in the page with the script on it because of licensing issues.

So the script needs to send the POST information to that page, just as a regular form.

If anybody can understand what I'm saying :p or think they can help me out, that would be great...

Thanks
-LiNx88

Timotheos

6:16 am on Nov 10, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Will this help?
[webmasterworld.com...]

All you have to do is add a header() function to go to your page.

Tim

LiNx88

2:45 am on Nov 12, 2005 (gmt 0)

10+ Year Member



No, sorry.

I've tried that script before - it doesn't redirect to the page, it just shows the response in the existing page.

Anybody else?

Thanks again
-Linx88

jatar_k

4:24 am on Nov 12, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld LiNx88,

cURL [php.net] is your best bet

Timotheos

2:38 pm on Nov 12, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



it doesn't redirect to the page

That's why I said...

All you have to do is add a header() function to go to your page.

So at the end of posting all the variables you put this line.

header("Location: http://www.mysite.com/whereiwanttogo.php");

LiNx88

6:47 pm on Nov 12, 2005 (gmt 0)

10+ Year Member



jatar_k: Thanks for the welcome... These forums are extremely helpful - I'll be sticking around for a while.

As for curl, I have used it before, however this isn't my server and I don't have the ability to install it.

I tried a header() before but it didn't work... I don't know why, because I would have thought that it would have worked.

Thanks
-LiNx88