VDaemon PHP Library | VDaemon Extension | Table of Contents
During this step we create the "hello!" form. This simple form contains only one "Name" entry field and submit button. After submitting the form visitor will see "Hello <Name>" greeting. We assume that you already know how to create html forms.
Page that contains the form will be called "form page". We also need to create "action page" - page which address is specified in the form's "action" attribute.
Create file with name "name.php" and copy this form page source code to it:
<html>
<head>
<title>Hello!</title>
</head>
<body>
<p>Hello form.</p>
<form method="POST" action="hello.php">
<table cellpadding="2" cellspacing="0" border="0">
<tr>
<td>
Enter your Name:
</td>
<td>
<input name="Name" type="text" size="25">
</td>
<tr>
<td colspan="2">
<input type="submit" value="Send">
</td>
</tr>
</table>
</form>
</body>
</html>
Create file with name "hello.php" and copy this action page source code to it:
<html> <head> <title>Hello!</title> </head> <body> <p>Hello <?php echo $_POST['Name']; ?>!</p> </body> </html>
Place these files to any location accessible by browser (the best place is your development web server document root). Try to run name.php using your browser.
Continue to Including vdaemon.php