• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved Znote myaccount.php VIP issue

Caduceus

Unknown Member
Joined
May 10, 2010
Messages
321
Solutions
2
Reaction score
24
My VIP day count will show up on a localhost test site, but when I upload to actual host, the VIP days will not display. I'm sure it's something simple I missed. Just can't seem to locate it.

You have <?php echo $user_data['vipdays']; ?> VIP days remaining.

Example Offline version: You have 8 VIP days remaining.
Example Live version: You have VIP days remaining.

Code:
?>
    <div id="myaccount">
        <h1>Account: <?php echo $user_data['name']; ?></h1>
        <p>Thank you for playing on Decapitated Soul! <br>
            You have <?php echo $user_data['vipdays']; ?> VIP days remaining.</p>
        <h2>Character List: <?php echo $char_count; ?> characters.</h2>
        <?php
        // Echo character list!
        $char_array = user_character_list($user_data['id']);
        // Design and present the list
        if ($char_array) {
            ?>
            <table id="myaccountTable" class="table table-striped table-hover" width="120%">
                <tr class="yellow">
                    <th>NAME</th><th>LEVEL</th><th>VOCATION</th><th>LAST LOGIN</th><th>STATUS</th><th>HIDE</th>
                </tr>
                <?php
                $characters = array();
                foreach ($char_array as $value) {
                    // characters: [0] = name, [1] = level, [2] = vocation, [3] = lastlogin, [4] = online
                    echo '<tr>';
                    echo '<td><a href="characterprofile.php?name='. $value['name'] .'">'. $value['name'] .'</a></td><td>'. $value['level'] .'</td><td>'. $value['vocation'] .'</td><td>'. $value['lastlogin'] .'</td><td>'. $value['online'] .'</td><td>'. hide_char_to_name(user_character_hide($value['name'])) .'</td>';
                    echo '</tr>';
                    $characters[] = $value['name'];
                }
            ?>
 
Last edited:
Well thats a very vague error... Looking at the code I see nothing wrong and if on your localhost works...

Maybe you did not upload the new schema or something?
 
I apologize for the vagueness. Not much else I can say about the issue. The Database is setup accordingly for the VIP info. my localhost database is a copy of my Live server. So the schema should be correct.
 
Issue was in engine/init.php. the 'vipdays' were not being pulled from the database.

Code:
$user_data = user_data($session_user_id, 'id', 'name', 'password', 'email', 'premdays', 'vipdays');
 
Back
Top