Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8" />
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <title>Page Title 3</title>
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="stylesheet" type="text/css" media="all" href="main.css" />
- </head>
- <body>
- <form autocomplete="off" action="task3.php" method="post">
- Введіть ім'я - <input required type="text" name="name" value="<?php $a=isset($_POST['name']); ?>"><br>
- Введіть прізвище - <input required type="text" name="surname" value="<?php $b=isset($_POST['surname']); ?>"><br>
- Введіть вік - <input required type="number" name="age" value="<?php $c=isset( $_POST['age']); ?>"><br>
- Введіть email - <input required type="text" name="email" value="<?php $d=isset($_POST['email']); ?>"><br>
- <button type="submit">Створити</button><br>
- </form>
- <?php
- error_reporting(0);
- class User {
- private $name = "";
- private $surname = "";
- private $age = "";
- private $email = "";
- function __construct($name,$surname, $age, $email){
- $this -> name = $name;
- $this -> age = $age;
- $this -> email = $email;
- $this -> surname =$surname;
- }
- public function renderInfoAboutUser() {
- echo "Користувач:";echo $this->name;echo " ";echo $this->surname; echo "<div></div>";
- echo "Вік: ";echo $this->age;
- echo "<div></div>";
- echo "Email:";echo $this->email; echo "</div>";
- }
- }
- $user = new User($a,$b, $c, $d);
- $user->renderInfoAboutUser();
- ?>
- <br><a href="main.html">На ГОЛОВНУ!</a>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement