Jump to content

Sessions Porblems :/


xyn

Recommended Posts

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

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
sent.
Link to comment
Share on other sites

Guest
This topic is now 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.