xyn Posted August 9, 2006 Share Posted August 9, 2006 Hii.I have got my news system, and I have allowd members tocomment the articles, However I only want registered membersto be able to comment. So i checked to see if the Logged Insession returns true.If so they can comment, otherwise it says they must be logged inor register if they don't have an account. My problem is whether themember 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 includedinto a page containing the session_start(); and it says headers are alreadysent. Link to comment Share on other sites More sharing options...
poirot Posted August 9, 2006 Share Posted August 9, 2006 You should check what $_SESSION['EumodUK'] really is set to, using something like:[code=php:0]var_dump($_SESSION['EumodUK']);[/code] Link to comment Share on other sites More sharing options...
xyn Posted August 9, 2006 Author Share Posted August 9, 2006 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. Link to comment Share on other sites More sharing options...
Recommended Posts