Solved

post data to page

Posted on 2008-11-01
4
249 Views
Last Modified: 2008-12-15
hello there..
I would like to post data to a page in php and then show the information of the posted data in the page..
so if this data if posted (Username=joe&Password=joe) then show it on the page..
it doesnt have to be username or password.. but anything that gets posted!
how can I do this?
0
Comment
Question by:XK8ER
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 28

Accepted Solution

by:
gamebits earned 500 total points
ID: 22859416
Assuming the data is being posted via a form

You would get the post data like this

$username = $_POST['username'];
$password = $_POST['password'];

And to display it on the page just echo the variable.

echo "USERNAME: $username";
echo "PASSWORD: $password";
0
 
LVL 1

Author Comment

by:XK8ER
ID: 22859428
like I said, its not username and password but anything that gets posted in the page!
0
 
LVL 28

Expert Comment

by:gamebits
ID: 22859438
Yes, what you need to do is use the name given to the posted data and assign it to a variable.

From where do you get the posted data?
0
 
LVL 1

Author Comment

by:XK8ER
ID: 22859448
from different pages from different forms.. that why I cannot use echo "USERNAME: $username";
because all of them are different.. so I want something to output the posted data!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question