Topic: login integration , weird problem [FIXED]
hi !
i have a problem to integrate the login in my homepage :
*if i log in through the homepage then go to the forum you're not connected. (with new threads link for exemple, if u just type /forum in url it works)
*if you log in through the forum then go to the homepage you're connected.
i'm pretty sure it's a cookies / session problem .. but can't figure it out.
login : test ; pass : test
http://www.micromediateam.com/TEKCLANv2/
<?
define('PUN_TURN_OFF_MAINT', 1); // if forums go down the site will not
define('PUN_QUIET_VISIT', 0); // update last visit when outside of the forums
if($pun_user['is_guest']){ // If the user is guest
?>
<a id="r" href="<? echo _PATH; ?>forum/register.php">REGISTER</a>
<a id="fp" href="<? echo _PATH; ?>forum/login.php?action=forget">PASSWORD?</a>
<form id="login" method="post" action="<? echo _PATH; ?>forum/login.php?action=in" onsubmit="return process_form(this)">
<p><input type="hidden" name="form_sent" value="1" />
<input type="hidden" name="redirect_url" value="<? echo _PATH; ?>index.php" /></p>
<p class="upinputspace"><input class="upinput" type="text" value="<?php echo $lang_common['Username'] ?>" name="req_username" tabindex="1"/></p>
<p class="upinputspace"><input class="upinput" type="password" value="<?php echo $lang_common['Password'] ?>" name="req_password" tabindex="2"/></p>
<p class="upsubmitspace"><input class="upsubmit" type="submit" name="login" value="SUBMIT" tabindex="3" /></p>
</form>
<?
}else{ // The user is registered
echo "<ul id='userlinks'>";
echo "<li>Welcome ".$pun_user['username']."<br /><a href='"._PATH."forum/profile.php?id=".$pun_user['id']."'>Profile</a></li>";
echo "<li><a href='"._PATH."forum/search.php?action=show_new'>Show new posts</a></li>";
echo "<li><a href='"._PATH."forum/login.php?action=out&id=".$pun_user['id']."'>Logout</a></li>";
echo "</ul>";
}
?>