1

Right now I'm passing a variable through the url and accessing it through _GET in another file.

header('location: addtitle.php?title='.urlencode($id));

I was wondering how I could do this for _POST and also redirect to another php file....should I just add a hidden form ?

4
  • 2
    By definition you cannot pass POST variables through the URL. Do you just want to send the user to a different page while POSTing some values…? Commented Jul 24, 2011 at 2:06
  • what this php file above does is get form data and the encodes it in the url to another php file Commented Jul 24, 2011 at 2:43
  • 1
    Please see PHP Redirect with POST data and others. Commented Jul 24, 2011 at 2:49
  • Yes that would do it....I want to set up a hidden form that automatically gets submitted...could this be done in jquery though? Commented Jul 24, 2011 at 2:59

1 Answer 1

2

What about trying curl to post a variable to the url?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.