Create a new file on your server called form.php and enter this code. Visit it in your browser and see the result.
<form method='post' action=''> <input type='text' name='search_keyword'> <input type='submit' name='search_button' value='Search'> </form>
<?php echo "<pre>"; print_r($_REQUEST); echo "</pre>"; ?>
<html>
<form method='post' action=''>
<input type='text' name='forename'>
<input type='submit' name='say_hello' value='Say hello'>
</form>
<?php
if(!empty($_REQUEST['forename'])) {
echo "Hello {$_REQUEST['forename']}";
}
?>
</html>
Add this to the very top of your file to enable error reporting and see how that changes the output of your form.php file.
<?php error_reporting(E_ALL); ini_set("display_errors", 1); ?>
Note: We'll start with this, then explain how to make it not as full-of-errors :)