simple html post-get (noob question)
Posted: Sat Jan 11, 2014 12:58 pm
i'm looking for a snippet of code in php to post a set of variables to a url and then display the return data. example:
&field1=a&field2=b&field3=3
https://www.example.com/dir/
i searched for a few hours and cannot put the code together. most of the php sites talk about post and get functions, but i cannot find a good, rather working, example. i am going to create forms on the page to gather vars and then build and post the url. i think... the server i am posting to will process the vars and return a big string of data. i confident i can parse the data. thanks in advance!
do i need two php pages, one to call the other? do i use html form submit? what tells the page to just display/print the response.
&field1=a&field2=b&field3=3
https://www.example.com/dir/
i searched for a few hours and cannot put the code together. most of the php sites talk about post and get functions, but i cannot find a good, rather working, example. i am going to create forms on the page to gather vars and then build and post the url. i think... the server i am posting to will process the vars and return a big string of data. i confident i can parse the data. thanks in advance!
do i need two php pages, one to call the other? do i use html form submit? what tells the page to just display/print the response.