Проверка - PHP Online
Form of PHP Sandbox
Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php
in the places where the PHP script should be executed.
Result of php executing
Full code of Проверка.php
- <?php
- $authorized = false;
- if(isset($_COOKIE['mail']) && isset($_COOKIE['password'])) {
- if(filter_var($_COOKIE['mail'], FILTER_VALIDATE_EMAIL) && !empty($_COOKIE['mail']) && !empty($_COOKIE['password']) && mb_strlen($_COOKIE['mail'],'UTF-8')>3 && mb_strlen($_COOKIE['mail'],'UTF-8')<64 && mb_strlen($_COOKIE['password'],'UTF-8')>3 && mb_strlen($_COOKIE['password'],'UTF-8')<64) {
- $mail=trim($_COOKIE['mail']);
- $password=$_COOKIE['password'];
- $res9 = $dbh->prepare("SELECT * FROM `users` WHERE `mail`=:mail and `password`=:password");
- $res9->execute(["mail" => $mail, "password" => $password]);
- $row_count = $res9->rowCount();
- if($row_count==0) {
- setcookie ("mail", '');
- setcookie ("password", '');
- }
- else
- {
- $user = $res9->fetch(PDO::FETCH_LAZY);
- $authorized = true;
- }
- }
- }
- ?>
File Description
- Проверка
- PHP Code
- 21 Feb-2021
- 840 Bytes
You can Share it:
Latest PHP Pastes