View Single Post
Join Date: Aug 2008
Posts: 48
Reputation: Demiloy is an unknown quantity at this point 
Solved Threads: 4
Demiloy Demiloy is offline Offline
Light Poster

Re: show club presidents info hide everyone else's

 
0
  #2
Aug 7th, 2008
Well, I don't know all your database, but here's a sample script I would use:

  1. if (!logged_in)
  2. {
  3. $query1 = mysql_query("SELECT * FROM membersinfo WHERE id = 'president'");
  4. while ($row = mysql_fetch array($sql))
  5. {
  6. echo "<tr>
  7. <td>$sub_office</td>
  8. <td>$fname $lname</td>
  9. <td>$hphone / $cphone</td>
  10. <td>$eml</td>
  11. <td>$adress, $cty, $st $zp</td>
  12. <td>$sub_name</td>
  13. </tr>";
  14. }
  15. } elseif (logged_in)
  16. {
  17. $query2 = mysql_query("SELECT * FROM membersinfo");
  18. while ($row = mysql_fetch array($sql))
  19. {
  20. echo "<tr>
  21. <td>$sub_office</td>
  22. <td>$fname $lname</td>
  23. <td>$hphone / $cphone</td>
  24. <td>$eml</td>
  25. <td>$adress, $cty, $st $zp</td>
  26. <td>$sub_name</td>
  27. </tr>";
  28. }
  29. }
Last edited by Demiloy; Aug 7th, 2008 at 11:00 am.
Reply With Quote