run code in 200+ php & hhvm versions
Bugs & Features
<?php // new data $id = isset($_POST['memids']); $truck_no = $_POST['truck_no']; $vin = $_POST['vin']; $plate = $_POST['plate']; $trk_status = $_POST['status']; // query $sql = "UPDATE truck SET truck_no=?, vin=?, plate=?, trk_status=?, user_id=? WHERE id=?"; $q = $db->prepare($sql); $q->execute(array($truck_no,$vin,$plate,$trk_status,$u->username,$id)); header("Location: truck.php"); exit; ?>
based on 7PNQR
Output for 7.1.25 - 7.3.2
Notice: Undefined index: truck_no in /in/Tr7FT on line 4 Notice: Undefined index: vin in /in/Tr7FT on line 5 Notice: Undefined index: plate in /in/Tr7FT on line 6 Notice: Undefined index: status in /in/Tr7FT on line 7 Notice: Undefined variable: db in /in/Tr7FT on line 12 Fatal error: Uncaught Error: Call to a member function prepare() on null in /in/Tr7FT:12 Stack trace: #0 {main} thrown in /in/Tr7FT on line 12
Process exited with code 255.