5
1
Fork 0
mirror of https://github.com/Anvilcraft/jensmemes synced 2024-11-21 18:35:57 +01:00

IP is now recorded for every image

This commit is contained in:
ITbyHF 2020-08-12 22:44:57 +02:00
parent b8fdc5f794
commit ee89fcc7a6

View file

@ -30,11 +30,13 @@ if (isset($_POST['submit'])) {
$memecat = $_POST['type'];
$user = $rowToken['name'];
$path = $home_dir.$filename;
$sqlType = "INSERT INTO images (user, path, cat) VALUES ('$user', '$path', '$memecat')";
$clientIP =$_SERVER['REMOTE_ADDR'];;
$sqlType = "INSERT INTO images (user, path, cat, ip) VALUES ('$user', '$path', '$memecat', '$clientIP')";
$resultType = mysqli_query($con,$sqlType);
if(!$resultType){
echo 'Error ' .mysqli_error($con);
}
}
if (empty($_COOKIE['token'])) {