Jump to content

login page loads randomly in other code?


Zeradin

Recommended Posts

	$newpmquery = 'SELECT * FROM pms WHERE pmto = '.$_SESSION['id'].' AND pmread = 0';
			$newpmresult = mysql_query($newpmquery);				
			if (mysql_num_rows($newpmresult) > 0) {
			echo '<a href="inbox.php" id="newMessages" target="formload"><strong>Inbox ['.mysql_num_rows($newpmresult).' New]</a></strong>';
			}
							else {
			echo
			'<a href="inbox.php" target="formload">Inbox</a>';
			}
			echo '<br /><a href="pmform.php" id="Messages" target="formload">Send a message</a>
			<br /><a href="pmadmin.php" target="formload">Message the Admins</a>';
			echo '</td>

 

When I go to the inbox i get the whole login page in the [ ] brackets for new messages. can anyone think of why? or where to look for more info? They seem to be completely disconnected. also if i just refresh the page it goes away

Link to comment
https://forums.phpfreaks.com/topic/125786-login-page-loads-randomly-in-other-code/
Share on other sites

I am going to have a complete guess about the structure of your script and see what happens :)

 

To get to the inbox you need to be logged in and are possibly storing a value in a session?

If you are not logged in, you are redirected to the login page?

Check that your session is active on the inbox page by commenting out the redirect code to login and echoing the session variable.

 

John

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.