CERN - European Organization for Nuclear Research     IT Division     IS Group  
       Saturday, 18 May 2024
Home Examples

2. "Form Handling"'

It's very easy work with form in PHP. The following example will show you how it work

1) The form

<form action="form-handler.php" method="POST">
Your name: <input type="text" name="name" />
Your age: <input type="text" name="age" />
<input type="submit">
</form>
 

2) The PHP script

Hi <?php echo $_POST["name"]; ?>
You are <?php echo $_POST["age"]; ?> years old

Here you can see working example : form handling


Continue to: " 3. Connection to databases"