Hello i'm here again 🙁 .
I have created an script wich makes an account.
So i have this piece off script wich don't functions good.
He is not inserting the sign_up date ( now() ).
It's not inserting the avatar pad.
the script:
if ($_FILES["avatar"])
{
$ext=explode(".", $_FILES["avatar"]["name"]);
$filehash=md5($_FILES["avatar"]["name"]);
$_FILES["avatar"]["name"] = substr($filehash, 0, 10).".".$ext[1];
$tmpfile = "images/avatars/".$_FILES["avatar"]["name"];
$size = $_FILES["avatar"]["size"];
if($size <= "20000")
{
if(!file_exists($tmpfile))
{
move_uploaded_file($_FILES['avatar']['tmp_name'], $tmpfile);
}
else
{
$_FILES["avatar"]["name"] = substr($filehash, 5, 15).".".$ext[1];
move_uploaded_file($_FILES['avatar']['tmp_name'], $tmpfile);
}
chmod($tmpfile, 0755);
echo 'De avatar is opgeslagen.<br>';
}
else
{
Echo "Je avatar is te groot: ".$size."/20000 Bytes</font>";
die();
}
}
$db_password = md5($paswoord);
$avat_pad = "http://www.streetfreaks.nl/".$tmpfile;
$sql = mysql_query("INSERT INTO users (voornaam, achternaam, woonplaats, geb_datum, info_auto, email_adres, website, avat_pad, nicknaam, paswoord, sign_up, user_level, cookie) VALUES ('$voornaam', '$achternaam', '$woonplaats', '$geb_datum', '$info_auto', '$emailadres', '$website', '$avat_pad', '$nicknaam', '$db_password', now(),
'1', '$cookie')")or die(mysql_error());
if(!$sql)
{
echo 'Er is een error geweest bij het maken van jouw account, neem alstublieft contact op met de webmaster.';
} else {
$userid = mysql_insert_id();
// Let's mail the user!
$subject = "Jouw lidmaatschap bij StreetFreaks.nl!";
$message = "Geachte $voornaam $achternaam,
Bedankt voor het registreren bij Streetfreaks.nl