Im having trouble trying to insert a value into my database, ‘randomkey’ is inserting as 0…
on one page I have…
if($usersClass->register($_POST['produgg_username'], md5($_POST['produgg_password']), $_POST['produgg_email'], $randomkey))
and the page which does the insert…
public function register($username, $password, $email)
{
$rs = mysql_query("INSERT INTO `$this->usersTable` (`username`, `password`, `email`, `randomkey` )
VALUES
('".mysql_real_escape_string($username)."',
'".mysql_real_escape_string($password)."',
'".mysql_real_escape_string($email)."',
'".$randomkey."'
)");
if($rs) {
return mysql_insert_id();
}else{
return false;
}
}
You forgot to include it in the accepted paramters:
Should be: