Hello,
I am sure welstein meant for you to copy and paste the code he gave you, but I will attempt to give you a little more description on how to do this. Basically you have two pages: an html page and a php page.
We will start with the html page. On the html page, you are providing a form to be filled out. The basic html page markup looks like this:
Code:
<html>
<head>
<title>My Form</title>
</head>
<body>
This is where our form will go
</body>
</html>
Now for the form markup. We will just have two inputs, one is for entering a name, and the other is for displaying a submit button. The basic form format is:
Code:
<form action="myphppage.php" method="post">
Your Name: <input type="text" name="person_name" /><br />
<input type="submit" value="Submit Form" />
</form>
As you can see the form tag contains and action and a method. The action specifies the file that will receive the information that is filled out in the form, the method specifies how it will receive the information. Also notice that our first input is specified as a type of text which means it will display a textbox and its name is specified as person_name which is how we will reference the information entered when we are writting the php page. The second input is of type submit which will display a submit button, and it's value is the message displayed on the button which in this case is simply Submit Form. So, let's name our html page contact.html, the final markup:
Code:
<html>
<head>
<title>My Form</title>
</head>
<body>
<p>Please fill out the form below:</p>
<form action="contact.php" method="post">
Your Name: <input type="text" name="person_name" /><br />
<input type="submit" value="Submit Form" />
</form>
</body>
</html>
OK, now moving on to the contact.php page. The basic php page looks like this:
Code:
<?php
//This is where your code goes
?>
The opening and closing php tags are specifying that this contains a php script. The two slashes is a comment, and are not parsed, meaning that it just helps explain the code, but doesn't actually do anything. As our method is post we will access our person_name textfield like so:
Code:
<?php
//display the person's name
echo "Hello " . $_POST['person_name'] . "! Thank you for filling out the form.";
?>
The echo statement is dispaying the text to the screen. Within the double quotes is text that will be displayed, the dot is appending (or adding) to whatever is currently there. This is just a simple example of how to receive the form variable, but you would likely want to store your values to a database or send them off in an email, we are just showing them on the screen.
For html tutorials I would highly recommend
w3schools.com. It goes step by step and shows tons of examples. For php help I am not too familiar with good tutorial sites out there. I am sure they are available though and maybe others can reply to this with their recommendations. I started a site
radiophp.com which has an audio podcast on it going through this same type of example. I have definatly neglected the site though, and have not created any new tutorials, but hopefully that will soon change.
Cheers.