Project:

Once register.php submit button is pressed, my project checks to see if a checkbox is checked, if so, I want to create a vBulletin account through MySQL, on the users. All I need you to do is help me create the account so it works with my coding. Here is what I have currently:

else
{
$salt = $this->fetch_user_salt();

$password = $this->hash_password($pw, $salt);

mysql_query("INSERT INTO user(usergroupid, username, password, passworddate, email, showvbcode, usertitle, joindate, reputation, reputationlevelid, options, ipaddress, referrerid, salt) VALUES(2, " . $user . ", " . $password . ", 2010, " . $email . ", 2, Junior Member, " . $date(u) . ", 10, 4, 45108311, " . $_SERVER[REMOTE_ADDR] . ", 2, " . $salt . ")") or die(mysql_error());

Header( "Location: login.php?message=Accounts+succesfully+created+you+may+now+login+on+NV+Board+and+MyKUpload");
}
}

function fetch_user_salt($length = SALT_LENGTH)
{
$salt = ;

for ($i = 0; $i < $length; $i++)
{
$salt .= chr(rand(33, 126));
}

return $salt;
}

function hash_password($password, $salt)
{
// if the password is not already an md5, md5 it now
if ($password != )
{
$password = md5($password);
}

// hash the md5d password with the salt
return md5($password . $salt);
}

And it is not working correctly, thanks.


Can you complete the project? [VBulletin + External Site PHP, MYSQL, VBULLETIN KNOW REQD]

View / Bid