I want to hide the table when the user is logon.

This is the code;

<div style="padding-left:20px">

<div id="welcome">welcome</div> //* I want to view this when it logon.

<table id="logon" style="height: 165px;" border="0" cellspacing="0" cellpadding="0" width="794">
<tbody>
<tr>

<form name="logon">

<input type="submit" name="Submit" class="button" value="Log In" />

</form>

</tr>
</table> //* this table I want to hide.
</div>

Recommended Answers

All 3 Replies

Member Avatar for rajarajan2017
<head>
<script type="javascript">
function JSHideForm()
{
  document.getElementById('hideform').style.display ='none';
}
</script>
</head>
<div id ="hideform">
<table id="logon" style="height: 165px;" border="0" cellspacing="0" cellpadding="0" width="794">
<tbody>
<tr>
<form name="logon">

<input type="submit" name="Submit" class="button" onClick="JSHideForm()" value="Log In" />

</form>

</tr>
</table>
</div>

I got it thank you rajarajan07, I have same problem regarding with that How to hide that table when it loads after log in when I return to that page?.
The problem is when I return to that page it says log-out and still the table is there. I want that table hide.

hi,
you can use session to get your solution.
Please refer
this link
http://www.w3schools.com/php/php_sessions.asp

I think this help you out.
At very first you have to check is there any session exist or not.if there is any session exist with the name you given then do not show table else show table.

If you still have doubt please let me know.

thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.