fork download
  1. <?php
  2. $name = $_POST['name'];
  3.  
  4. $user = 'cy70845_db';
  5. $pass = '123456789';
  6. $db = new PDO('mysql:host=localhost;dbname=cy70845_db', $user, $pass);
  7. $db->exec("INSERT INTO requests(`time`, name) VALUES(NOW(), '$name')");
  8.  
  9. echo '1';
Runtime error #stdin #stdout #stderr 0.02s 24404KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
PHP Notice:  Undefined index: name in /home/wCrqdb/prog.php on line 2
PHP Fatal error:  Uncaught PDOException: could not find driver in /home/wCrqdb/prog.php:6
Stack trace:
#0 /home/wCrqdb/prog.php(6): PDO->__construct('mysql:host=loca...', 'cy70845_db', '123456789')
#1 {main}
  thrown in /home/wCrqdb/prog.php on line 6