l3iohazard
Limp Gawd
- Joined
- Dec 22, 2010
- Messages
- 278
First of all, Im still new to php and html for the most part. My question is this, I want to go above what my assignment calls for and create a form that the user can enter their name, city, and state. Originally the assignment called for just entering my name in the variable but seemed to easy. How would I go about collecting the data the user entered into the form and adding it to the php variable? This is what I have so far. Am I even heading in the right direction?
Code:
<?PHP
echo "<form action=$PHP_SELF method=POST>
Name: <input type="text" name="firstname" />
City: <input type="text" name="city" />
State: <input type="text" name="state" />
<input type=submit value=Submit>
</form>";
?>