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>
</div>
<div style="padding-left:20px">

<div id="welcome">welcome</div> //* I want to view this when it logon.
<?
if($_session[userid]==''){
?>
<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>
<?
}
?>
</div>

if it helps, you can use Javascript's getElementById() and innerHTML to achieve what you want. PM me if you need help.

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.