fork download
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Сокращатель ссылок</title>
  6. </head>
  7. <body>
  8. <form action="" method="post">
  9. <input type="url" required placeholder="Введите ссылку..." autocomplete="off" name="link">
  10. <input type="submit" name="submit" value="Сократить">
  11. </form>
  12. </body>
  13. </html>
  14.  
  15. <?php
  16. $content = $_POST ['link'];
  17. $mysqli = new mysqli ("localhost", "fedsar3e_link", "123456", "fedsar3e_link");
  18. $succeess = $mysqli-> query ("SELECT INTO `sef` (`alias`) VALUES ( '$content')" );
  19. if ($succeess == false){
  20. echo "No";
  21. }
  22. else echo "yes";
  23. echo $succeess;
  24. $mysqli-> close();
  25. ?>
Runtime error #stdin #stdout #stderr 0.01s 82880KB
stdin
Standard input is empty
stdout
<!DOCTYPE html>
<html>
 <head>
  <meta charset="utf-8">
<title>Сокращатель ссылок</title>
 </head>
 <body>
<form action="" method="post">
<input type="url" required placeholder="Введите ссылку..." autocomplete="off" name="link">
<input type="submit" name="submit" value="Сократить">
</form>
 </body>
</html>

stderr
PHP Notice:  Undefined index: link in /home/wqHIaf/prog.php on line 16
PHP Fatal error:  Uncaught Error: Class 'mysqli' not found in /home/wqHIaf/prog.php:17
Stack trace:
#0 {main}
  thrown in /home/wqHIaf/prog.php on line 17