I have a line in my php like so...
$newUser->register();
this calls register method from User class which looks like this...
function register()
{
$now = time();
$db = new Database;
$db->connect();
$sql = "INSERT INTO users";
$sql .= " (user_uname, user_fname, user_sname, user_alias, user_location, user_age, user_telephone, user_email, user_password, user_reg, user_lastlog, user_haspic)";
$sql .= " values('$this->uname','$this->fname','$this->alias','$this->location','$this->age','$this->telephone','$this->email','$this->password','$now', '$now', '$this->haspic')";
mysql_query($sql);
$db->disconnect();
}
the class Database which is used above is just a simple connect/disconnect class. The problem is when i call the register function nothing at all happens. There are no records inserted and im not getting any errors. If i had a line like print "test"; test is printed, this confirms the method IS being called, but why am i getting no record in the db or no error? :bemused: