Really simple code
$device = $_GET['device'];
$voltage = $_GET['voltage'];
$current = $_GET['current'];
$power = $current * $voltage;
mysqli_query($connect, "insert into device$device (time, voltage, current, power)
values (curtime(), $voltage, $current, $power);");
The problem is, it used to work whatever device number I put. It only works with device 1. Didn't change anything with the mysql database or the php code, it just suddenly didn't work anymore, except if $device=1
.
No errors are reported either.