O'Reilly logo

PHP 7 Quick Scripting Reference, Second Edition by Mikael Olsson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

© Mikael Olsson 2016

Mikael Olsson, PHP 7 Quick Scripting Reference, 10.1007/978-1-4842-1922-5_23

23. User Input

Mikael Olsson

(1)Hammarland, Finland

When an HTML form is submitted to a PHP page, the data becomes available to that script.

HTML Form

An HTML form has two required attributes : action and method. The action attribute specifies the script to which the form data is passed. For example, the following form submits one input property called myString to the mypage.php script file.

<!doctype html><html><body>  <form action="mypage.php" method="post">    <input type="text" name="myString">    <input type="submit">  </form></body></html>

The other required attribute of the form element specifies the sending method, which may be either GET or POST. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required