Profiles wont open?

Page 5 of 5 FirstFirst 12345
Results 61 to 68 of 68
  1. #61
    Gaby is offline
    MemberRank
    Apr 2013 Join Date
    Viva HollandiaLocation
    1,607Posts

    Re: Profiles wont open?

    Quote Originally Posted by Mrdevy View Post
    All sorted now! Thanks for your help :)
    You're welcome :D

  2. #62
    Enthusiast Mario1134 is offline
    MemberRank
    Oct 2011 Join Date
    26Posts

    Re: Profiles wont open?

    Quote Originally Posted by BaasHotel View Post
    You're welcome :D
    public function addUser($username, $passwordHash, $email, $rank, $figure, $sex, $motto, $homeroom, $id) {
    global $db, $core;
    if($this->stmt = $db->prepare("INSERT INTO users (username,password,mail,auth_ticket,rank,look,gender,motto,home_room,credits,activity_points,last_online,account_created,ip_last,ip_reg) VALUES ('" . $username . "','" . $passwordHash . "','" . $email . "','','" . $rank . "','" . $figure . "','" . $sex . "', '" . $motto . "', '" . $homeroom . "','15000','1000','','" . date('d-M-Y') . "', '".$_SERVER['REMOTE_ADDR']."', '".$_SERVER['REMOTE_ADDR']."')")) {
    $this->stmt = $db->prepare("INSERT INTO user_info (user_id,bans,cautions,reg_timestamp,login_timestamp,cfhs,cfhs_abusive) VALUES ('" . $id . "','0','0','" . time(). "','" . time() . "','0','0')");
    $this->stmt->execute();
    $this->stmt->close();
    }
    else {
    $db->databaseError($db->error);
    }
    }


    Finally got it working. But it says i created the account on 1/1/1970? Ive checked the account_created table, if i put the numbers inside the user_info it works. How do i make sure that users who have logged in its automatically inserted into user_info table?
    Last edited by Mario1134; 01-07-13 at 10:17 PM.

  3. #63
    Enthusiast Mario1134 is offline
    MemberRank
    Oct 2011 Join Date
    26Posts

    Re: Profiles wont open?

    Why does it say that i registered on 1/1/1970

  4. #64
    Gaby is offline
    MemberRank
    Apr 2013 Join Date
    Viva HollandiaLocation
    1,607Posts

    Re: Profiles wont open?

    Quote Originally Posted by Mario1134 View Post
    Why does it say that i registered on 1/1/1970
    Because you probably used a date that actually doesn't excist.

  5. #65
    Enthusiast Mario1134 is offline
    MemberRank
    Oct 2011 Join Date
    26Posts

    Re: Profiles wont open?

    Quote Originally Posted by BaasHotel View Post
    Because you probably used a date that actually doesn't excist.
    No i did, because if i insert my reg_timestamp from users into user_info it shows i registered on 28/06/2013.

    I think its to do with the queries, not sure though.

  6. #66
    Gaby is offline
    MemberRank
    Apr 2013 Join Date
    Viva HollandiaLocation
    1,607Posts

    Re: Profiles wont open?

    Quote Originally Posted by Mario1134 View Post
    No i did, because if i insert my reg_timestamp from users into user_info it shows i registered on 28/06/2013.

    I think its to do with the queries, not sure though.
    You'll have to use a unix timestamp in your user_info.

  7. #67
    Hakuna Matata Matata is offline
    MemberRank
    Sep 2012 Join Date
    DenmarkLocation
    807Posts

    Re: Profiles wont open?

    Quote Originally Posted by Mario1134 View Post
    No i did, because if i insert my reg_timestamp from users into user_info it shows i registered on 28/06/2013.

    I think its to do with the queries, not sure though.
    Use strtotime().

  8. #68
    Enthusiast Mario1134 is offline
    MemberRank
    Oct 2011 Join Date
    26Posts

    Re: Profiles wont open?

    Quote Originally Posted by Matata View Post
    Use strtotime().
    Where do I put this?



Page 5 of 5 FirstFirst 12345

Advertisement