3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php include_once('config.php'); // terima data dari halaman index.php $username = mysql_real_escape_string($_POST['username']); $password = mysql_real_escape_string($_POST['password']); $email = mysql_real_escape_string($_POST['email']); $fullname = mysql_real_escape_string($_POST['fullname']); $role = 'member'; // variabel untuk settingan default level yang mendaftar // simpan data ke database $query = mysql_query("insert into users values('', '$username', '$password', '$email', '$fullname', '$role')"); if ($query) { // jika berhasil menyimpan header('location: index.php?msg=success'); } else { // jika gagal menyimpan header('location: index.php?msg=failed'); }
Output for 7.0.0 - 7.2.0
Warning: include_once(config.php): failed to open stream: No such file or directory in /in/hb6ni on line 2 Warning: include_once(): Failed opening 'config.php' for inclusion (include_path='.:') in /in/hb6ni on line 2 Fatal error: Uncaught Error: Call to undefined function mysql_real_escape_string() in /in/hb6ni:5 Stack trace: #0 {main} thrown in /in/hb6ni on line 5
Process exited with code 255.
Output for 5.3.22 - 5.6.28
Warning: include_once(config.php): failed to open stream: No such file or directory in /in/hb6ni on line 2 Warning: include_once(): Failed opening 'config.php' for inclusion (include_path='.:') in /in/hb6ni on line 2 Fatal error: Call to undefined function mysql_real_escape_string() in /in/hb6ni on line 5
Process exited with code 255.