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.
Post data from a form
Moderator: General Moderators
Re: Post data from a form
All the data that is being sent in post method is stored in the $_POST variable of the page.
this will echo out all the variable names as well as the values in the post array.
Code: Select all
print_r($_POST);
Re: Post data from a form
Thank you very much....