Jump to content


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


Sessions Porblems :/

Recommended Posts

I have got my news system, and I have allowd members to
comment the articles, However I only want registered members
to be able to comment. So i checked to see if the Logged In
session returns true.

If so they can comment, otherwise it says they must be logged in
or register if they don't have an account. My problem is whether the
member is logged in or not it still returns:

"only members can comment news articles" :/

my code...
if($_SESSION['EumodUK'] != true) {
echo '<div align="center">
  <table border="0" cellpadding="2" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="60%">
      <td width="100%">
      <hr color="#AAD2FF" width="95%" align="left" size="1" style="border: 1px dashed #AAD2FF">
      <td width="100%">
      <p align="center" class="text">Only members can make comments.</td>
//rest of page...

NOTE: the reason i don't have "session_start();" is because this is included
into a page containing the session_start(); and it says headers are already

Share this post

Link to post
Share on other sites
You should check what $_SESSION['EumodUK'] really is set to, using something like:


Share this post

Link to post
Share on other sites
Well I went the the "include" and put that exact code and it works..
So unless there was a problem with the includes who knows :/
Sorry If i wasted peoples time.

Share this post

Link to post
Share on other sites
This topic is now closed to further replies.


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.