Hi, I am really really new to this, but I'm having a bit of trouble with some php.
I have a HTML file which I have no access to, and a snippet is below:
<form onsubmit="return validate();" method="post" action="process-quiz.php"> <h2>A Simple Quiz</h2> <fieldset> <legend>Name</legend> <p id="UserInfo">What is your name?</p> <div> <input type="text" name="UserInfo" size="40" /> </div> </fieldset> <fieldset> <legend>The questions</legend> <ol> <li> <p id="Q1">What does this message spell?</p> <div>
Hopefully this shows that the HTML file has one big form with multiple data entry methods, all of which are sent to a php file via POST.
I want the PHP file to create a html page and display the answers as part of the text. I tried this:
<?php $username=$_POST['UserInfo']; echo $username;?>
and various other combinations but nothing gets displayed. I think my main problem is that I don't understand what I would use to point to the text-box entry using php.
Any help would be appreciated!