OkFx.Net, get rebates from your trade

PHP Forms and User Input

The most important thing to notice when dealing with HTML forms and PHP is that any form element in an HTML page will automatically be available to your PHP scripts.

Form example :

<html>
<body>

<form action=”welcome.php” method=”post”>
Name: <input type=”text” name=”name” />
Age: <input type=”text” name=”age” />
<input type=”submit” />
</form>

</body>
</html>

The example HTML page above contains two input fields and a submit button. When the user fills in this form and click on the submit button, the form data is sent to the “welcome.php” file.

And if The “welcome.php” file looks like this:

<html>
<body>

Welcome <?php echo $_POST[”name”]; ?>.<br />
You are <?php echo $_POST[”age”]; ?> years old.

</body>
</html>

If at the form name we fill Johnson, and Age fill with  30

Output welcome.php will appear like this

Welcome Johnson.
You are 30 years old.


Related post :
  • Web Forms in Just a Few Clicks
  • NetBIOS (Network Basic Input Output System)
  • PHP Sending E-mails
  • PHP $_GET and $_POST at php form
  • How to Open Access Database Forms With a Simple Function That Saves You Time and Work
  • One Response to “PHP Forms and User Input”

    1. Satellite Tv For You Pc Says:

      %greetings%


      reply

    Leave a Reply