$timeforlog = date("H:i:s");
$dateforlog = date("d/m/y");
$ip = $_SERVER['REMOTE_ADDR'];
$date = $dateforlog;
$time = $timeforlog;
$link = $actual_link;
$responsefromsite = $response;
$response = trim(preg_replace('/\s+/', ' ', $output));
$stmt = $conn->prepare("INSERT INTO logs (ondate, ontime, link, ip, response) VALUES (?,?,?,?,?)");
$stmt->bind_param("sssss", $date, $time, $link, $ip,$responsefromsite);
$stmt->execute();
Its expected to go ahead and add to the database. However despite tables being correct as shown below, it wont.
(note: the ?
and t
lines shown in the table was testing the queries)