Easy PHP Guestbook Part 3 – The Form


Apple iTunes

In Part 3 of the Easy PHP Guestbook tutorial we will cover creating the user submission form for our guestbook.

Create a new file and call it guestbookform.php and put the following code in it:

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<meta http-equiv=”Content-Type” content=”text/html; charset=UTF8″ />
<title>My Guestbook</title>

<form action=”” method=”post”>
<input type=”text” name=”guestbookname” id=”guestbookname” />
<br />
<input type=”text” name=”guestbookwebsite” id=”guestbookwebsite” />
<br />
<textarea name=”guestbookentry” id=”guestbookentry” cols=”45″ rows=”5″></textarea>
<br />
<input type=”submit” name=”submit” id=”submit” value=”Submit” />

Save the file and upload it to your guestbook folder that you created on the server from the previous tutorial. You can point your browser to http://yourservername.com/guestbook/guestbookform.php

You should see the form with a spot to write a name, website and an entry, as well as a submit button. This file as it is now will not perform any functions, in part 4 we will cover how to take the values that a user would fill in and store them in the database.

This concludes Part 3 of the tutorial.

Similar Posts:

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)
Be Sociable, Share!

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!