943,022 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 1200
  • PHP RSS
Jul 19th, 2010
0

How to hide a table using php if statement

Expand Post »
I want to hide the table when the user is logon.

This is the code;

PHP Syntax (Toggle Plain Text)
  1.  
  2. <div style="padding-left:20px">
  3.  
  4. <div id="welcome">welcome</div> //* I want to view this when it logon.
  5.  
  6. <table id="logon" style="height: 165px;" border="0" cellspacing="0" cellpadding="0" width="794">
  7. <tbody>
  8. <tr>
  9.  
  10. <form name="logon">
  11.  
  12. <input type="submit" name="Submit" class="button" value="Log In" />
  13.  
  14. </form>
  15.  
  16. </tr>
  17. </table>
  18. </div>
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
waren is offline Offline
8 posts
since Jun 2010
Jul 20th, 2010
0
Re: How to hide a table using php if statement
PHP Syntax (Toggle Plain Text)
  1. <div style="padding-left:20px">
  2.  
  3. <div id="welcome">welcome</div> //* I want to view this when it logon.
  4. <?
  5. if($_session[userid]==''){
  6. ?>
  7. <table id="logon" style="height: 165px;" border="0" cellspacing="0" cellpadding="0" width="794">
  8. <tbody>
  9. <tr>
  10.  
  11. <form name="logon">
  12.  
  13. <input type="submit" name="Submit" class="button" value="Log In" />
  14.  
  15. </form>
  16.  
  17. </tr>
  18. </table>
  19. <?
  20. }
  21. ?>
  22. </div>
Reputation Points: 21
Solved Threads: 35
Posting Pro
muralikalpana is offline Offline
534 posts
since Sep 2009
Jul 20th, 2010
0
Re: How to hide a table using php if statement
if it helps, you can use Javascript's getElementById() and innerHTML to achieve what you want. PM me if you need help.
Reputation Points: 10
Solved Threads: 1
Newbie Poster
steventaal is offline Offline
23 posts
since Mar 2010

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Onchange Dropdown Variable and Javascript
Next Thread in PHP Forum Timeline: how to add UDH in smpp class to deliver message on port





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC