Hi! I'm experiencing a weird issue when i send the steamid via sql form (pdo). For exemple, my steamid is: 76561198095981948 and when i send my form, on the database, my steamid is 2147483647 (that is not a steam id at all, but return to someone, not me...).
I echoed the steamid, and he was right. And that's weird because, when the users log into my website, they got the right steamid, but not in this page 🤔 .
(Here is a part of my code (only where there is the form action), if you need it.)
<?php
if (isset($_POST["submit"]))
{
#retrieve file title
$title = $_POST["title"];
$steamid = $_POST["steamid"];
#file name with a random number so that similar dont get replaced
$pname = rand(1000,10000)."-".$_FILES["file"]["name"];
$allowed = array("image/jpeg", "image/gif", "image/png");
#temporary file name to store file
$tname = $_FILES["file"]["tmp_name"];
#upload directory path
$uploads_dir = 'assets/img/gallery/';
#TO move the uploaded file to specific location
move_uploaded_file($tname, $uploads_dir.'/'.$pname);
#sql query to insert into database
$sql = "INSERT INTO images (CreationTimestamp,title,image,steamid,steamname) VALUES(NOW(),'$title','$pname','".$steamprofile['steamid']."','".$steamprofile['personaname']."')";
if($bdd->query($sql)){
echo "<script>console.log('File Sucessfully uploaded'),</script>";
}
else{
echo "Error";
}
}
?>```
Any answers ?
Thanks.
Hi! I'm experiencing a weird issue when i send the steamid via sql form (pdo). For exemple, my steamid is:
76561198095981948
and when i send my form, on the database, my steamid is2147483647
(that is not a steam id at all, but return to someone, not me...). I echoed the steamid, and he was right. And that's weird because, when the users log into my website, they got the right steamid, but not in this page 🤔 .(Here is a part of my code (only where there is the form action), if you need it.)