PHP:
скопировать код в буфер обмена
скопировать код в буфер обмена
- <?PHP
- function sanitize_input(&$request) {
- }
- if ($_POST["submit"]) {
- $sql = "INSERT INTO employees (first,last,address,position) VALUES ('".$_POST["first"]."','".$_POST["last"]."','".$_POST["address"]."','"._POST["$position"]."')";
- } else {
- $form = '<form method="post" action="'.$PHP_SELF.'">
- First name:<input type="Text" name="first"><br>
- Last name:<input type="Text" name="last"><br>
- Address:<input type="Text" name="address"><br>
- Position:<input type="Text" name="position"><br>
- <input type="Submit" name="submit" value="Enter information">
- </form>';
- }
- ?>
- <body>
- <?PHP echo $form; ?>
- </body>
- </html>