This is rather problem about javascript than PHP -
But I think that you need to use double quotes (escaped) to distinguish query and 
variables in your javascript query:

Try out this, It work fine for me:
if(!isset($HTTP_SESSION_VARS['svUserAccess'])){

echo "<td class='mainmenu' align='center' width='12.5%'

style='cursor:hand' onMouseover=\"this.style.backgroundColor='#C0E0FF'\"

onMouseout=\"this.style.backgroundColor=''\"

onClick=\"window.location.href='login.php'\"><a

href='login.php'>Login</a></td>";

} else {

echo "<td class='mainmenu' align='center' width='12.5%'

style='cursor:hand' onMouseover=\"this.style.backgroundColor='#C0E0FF'\"

onMouseout=\"this.style.backgroundColor=''\"

onClick=\"window.location.href='logout.php'\"><a

href='login.php'>Logout</a></td>";



wrote in message news:20021104022815.4043.qmail@;pb1.pair.com...
> I'm having trouble with the following code dispalying an error, which I
> don't understand because the code actually works (other than the error). Any
> ideas?
> 
> <?
> if(!isset($HTTP_SESSION_VARS['svUserAccess'])){
>   echo "<td class='mainmenu' align='center' width='12.5%'
> style='cursor:hand' onMouseover='this.style.backgroundColor='#C0E0FF''
> onMouseout='this.style.backgroundColor='''
> onClick='window.location.href='login.php''><a
> href='login.php'>Login</a></td>";
> } else {
>   echo "<td class='mainmenu' align='center' width='12.5%'
> style='cursor:hand' onMouseover='this.style.backgroundColor='#C0E0FF''
> onMouseout='this.style.backgroundColor='''
> onClick='window.location.href='logout.php''><a
> href='login.php'>Logout</a></td>";
>   }
> ?>
> 
> Thanks
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

Reply via email to