Page 1 of 1

Post data from a form

Posted: Wed Feb 18, 2009 8:04 am
by sonu611
I am relatively new to php and web development.
I have a page which accepts data in post format.
The data is posted from a different site(my friend's site).

In this case I do know, what variables are there in the post data, but in case i do not know the variables in the post data coming in my page, how do i get to know the variable names, and accept the data in them. If i can manage to get the variable names, then i suppose i can do the rest. But i have no idea to extract all the variable names in the post data.

I would be really glad if someone helped me on this.

Re: Post data from a form

Posted: Wed Feb 18, 2009 8:07 am
by susrisha
All the data that is being sent in post method is stored in the $_POST variable of the page.

Code: Select all

 
print_r($_POST);
 
this will echo out all the variable names as well as the values in the post array.

Re: Post data from a form

Posted: Wed Feb 18, 2009 9:50 am
by sonu611
Thank you very much....