Example Form Processing Script
The following script parses the results from the EVE
HTML test file
<?php
error_reporting(E_ALL);
# Process results from Eve test form
print '<html><title>Form Results</title><body><h1>Form Results</h1>';
if (empty($_POST['text']))
{
print 'No text entered<br>';
}
else
{
print 'Text entered: ' . $_POST['text'] . '<br>';
}
if (empty($_POST['password']))
{
print 'No password entered<br>';
}
else
{
print 'Password entered: ' . $_POST['password'] . '<br>';
}
if (empty($_POST['textarea']))
{
print 'No textarea entered<br>';
}
else
{
print 'Textbox entered: ' . $_POST['textarea'] . '<br>';
}
if (empty($_POST['checkbox1']))
{
print 'Checkbox1 not checked<br>';
}
else
{
print 'Checkbox1 checked<br>';
}
if (empty($_POST['checkbox2']))
{
print 'Checkbox2 not checked<br>';
}
else
{
print 'Checkbox2 checked<br>';
}
if (empty($_POST['radio']))
{
print 'radio not checked<br>';
}
else
{
print 'radio ' . $_POST['radio'] . ' checked<br>';
}
if (empty($_POST['select']))
{
print 'select not selected<br>';
}
else
{
print 'select ' . $_POST['select'] . ' selected<br>';
}
print '<hr><a href="http://www.mcdee.net/eve/test.html">Back to test page</a></body></html>';
?>