Post data from a form

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sonu611
Forum Newbie
Posts: 2
Joined: Wed Feb 18, 2009 7:50 am

Post data from a form

Post 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.
User avatar
susrisha
Forum Contributor
Posts: 439
Joined: Thu Aug 07, 2008 11:43 pm
Location: Hyderabad India

Re: Post data from a form

Post 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.
sonu611
Forum Newbie
Posts: 2
Joined: Wed Feb 18, 2009 7:50 am

Re: Post data from a form

Post by sonu611 »

Thank you very much....
Post Reply