truefusion, on Mar 5 2010, 05:08 PM, said:
The reason why it doesn't update is because of the browser, not necessarily the code you are using. The meta information anwiii provided should go on the page that you'll be redirecting to; the JavaScript, obviously, where you want the redirect to occur.
If PRAMGA:NO-CACHE doesn't work, try CACHE-CONTROL:NO-CACHE
<meta http-equiv="cache-control" content="no-cache">
but I don't want the whole page to not cache, just the login form, btw, I'm messing with the login page so it won't be the same as it was
EDIT>
I cannot use meta tags, maybe this will help.
This is my form for the main site
<?php
//log into the database
$dbhost = 'localhost';
$dbuser = '********';
$dbpass = '********';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
$dbname = '**************';
mysql_select_db($dbname);
?>
<?php if (isset($_COOKIE["member_id"])) {
if ($_COOKIE["member_id"] == 0) {
echo "<form action='/forums/index.php?act=Login&CODE=01' method='post' name='LOGIN'>
<strong>Username</strong>: <input type='text' size='25' maxlength='64' name='UserName' /><br />
<strong>Password</strong>: <input type='password' size='25' name='PassWord' /><br />
Remember Me? <input class='checkbox' type='checkbox' name='CookieDate' value='1' checked='checked' /><br />
<input class='button' type='submit' name='submit' value='Log In' />
</form><br />
<a href='/forums/index.php?act=Reg'>Register</a>";
}
else { // Content that shows up if logged in
// get the persons username from the database
$query = mysql_query("SELECT `members_display_name` FROM `ibf_members` WHERE `id`=" . mysql_real_escape_string($_COOKIE['member_id']) . " LIMIT 1");
//then you need to get the result into an array
$result = mysql_fetch_assoc($query);
//show the username
echo "Welcome Back {$result['members_display_name']}";
}
}
else {
echo "<form action='/forums/index.php?act=Login&CODE=01' method='post' name='LOGIN' target='_top'>
<strong>Username</strong>: <input type='text' size='25' maxlength='64' name='UserName' /><br />
<strong>Password</strong>: <input type='password' size='25' name='PassWord' /><br />
Remember Me? <input class='checkbox' type='checkbox' name='CookieDate' value='1' checked='checked' /><br />
<input class='button' type='submit' name='submit' value='Log In' />
</form><br />
<a href='/forums/index.php?act=Reg'>Become a Member!</a>";
}
?>
and here's the code for the member bar on the forums
<if="$this->ipsclass->member['id']">
<div id="userlinks">
<p class="home"><b>{$this->ipsclass->lang['logged_in_as']} <a href="{$this->ipsclass->base_url}showuser={$this->ipsclass->member['id']}">{$this->ipsclass->member['members_display_name']}</a></b> ( <a href="{$this->ipsclass->base_url}act=Login&CODE=03&k={$this->ipsclass->md5_check}">{$this->ipsclass->lang['log_out']}</a> )</p>
<p>
<else />
<div id="userlinksguest">
<p class="pcen"><b>{$this->ipsclass->lang['guest_stuff']}</b> ( <a href="{$this->ipsclass->base_url}act=Login&CODE=00">{$this->ipsclass->lang['log_in']}</a> | <a href="{$this->ipsclass->base_url}act=Reg&CODE=00">{$this->ipsclass->lang['register']}</a> )
</if>
<if="$this->ipsclass->member['mgroup'] == $this->ipsclass->vars['auth_group']">
<b><a href="{$this->ipsclass->base_url}act=reg&CODE=reval">{$this->ipsclass->lang['resend_val']}</a></b> ·
</if>
<if="$this->ipsclass->member['g_access_cp'] == 1 AND $this->ipsclass->vars['security_remove_acp_link'] == 0">
<b><a href="{$this->ipsclass->vars['_admin_link']}" target="_blank">{$this->ipsclass->lang['admin_cp']}</a></b> ·
</if>
<if="$this->ipsclass->member['has_blog'] == 1">
<b><a href="{$this->ipsclass->base_url}automodule=blog&req=showblog&mid={$this->ipsclass->member['id']}">{$this->ipsclass->lang['myblog']}</a></b> ·
</if>
<if="$this->ipsclass->member['has_gallery'] == 1">
<b><a href="{$this->ipsclass->base_url}autocom=gallery&req=user&user={$this->ipsclass->member['id']}">{$this->ipsclass->lang['submenu_albums']}</a></b> ·
</if>
<if="$this->ipsclass->member['id']">
<b><a href="{$this->ipsclass->base_url}act=UserCP&CODE=00" title="{$this->ipsclass->lang['cp_tool_tip']}">{$this->ipsclass->lang['your_cp']}</a></b> · <!--UNREAD_TOPICs-->
<if="$this->ipsclass->member['g_view_board']">
· <a href="java script:buddy_pop();" title="{$this->ipsclass->lang['bb_tool_tip']}">{$this->ipsclass->lang['l_qb']}</a>
</if>
· <a href="java script:friends_pop();">{$this->ipsclass->lang['gbl_my_friends']}</a>
</if>
<if="$this->ipsclass->member['g_use_pm'] AND $this->ipsclass->member['members_disable_pm'] == 0">
· <a href="{$this->ipsclass->base_url}act=Msg&CODE=01">{$msg['TEXT']}</a>
</if>
</p>
</div>
so I think what it boils down to is disabling caching on those 2 elements
Edited by Soviet Rathe, 05 March 2010 - 11:58 PM.