Hey all I am trying to setup this page for example check current user and check there memberstatus and if it equal to member_individual or member_group my query just checks there memberstatus. Im sure i am missing something simple to check for current user. here my code. thanks <?php $login_form = "loginform.php"; require "library/authorize.php"; $query_rs1 = "SELECT * FROM USERS WHERE MEMBERSTATUS = 'Member_Individual' or MEMBERSTATUS = 'Member_Group'"; if ($login != fail) { ?> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td class="padder5" ><span class="textclass1"><strong>Logged In</strong></span><div align="right"><strong>( <a href="?page=account">Continue To My Account</a> )</strong></div></td> </tr> </table> <table width="100%" cellpadding="0" cellspacing="0" border="0" > <tr> <td class="padder5"><p>You have successfully logged in.</p></td> </tr> <tr> <?php if ($row_rs1['MEMBERSTATUS'] == 'Member_Individual' || $row_rs1['MEMBERSTATUS'] == 'Member_Group') {?> <td class="padder5"><p>include community page here..</p></td><?php };?> </tr> <tr> <td class="padder5"><div align="right"><strong>( <a href="?page=account">Continue To My Account</a> )</strong></div></td> </tr> </table> <?php } ?> Code (markup):
yes I do have a connection setup. it logs a user in and they come to this page. and based on a users memberstatus i want to show community page.
Ok well first you need to execute the query. Im not to sure on what db etc your using so im going to guess mysql.. Also im not sure how you have your sessions or db setup because based on the query you have there isn't sufficient to grab the currently lo-gin in user. but here is a basic check. $result = mysql_query($query_rs1); if (mysql_num_rows($result) > 0) { [show what you want to show here, means that the query came back with a row] } Code (markup):