CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Hiding gridform

Print topic Send  topic

Author Message
travel-net

Posts: 56
Posted: 04/01/2004, 5:49 AM

Hello,

I wan't to unhide a gridform based on the UserID. This is my code

global $NewGrid1;
if (CCGetUserID == 0) {
$NewGrid1->Visible = false;
} else {
$NewGrid1->Visible = false;
}

User logs in: Hide Grid
Guest views page: Unhide Grid

What is wrong?

Regards,
Frans
View profile  Send private message
lvalverdeb

Posts: 299
Posted: 04/01/2004, 6:42 AM

It is probably just a typo in your message, but the correct function name is CCGetUserID(). Also, you can get the same results using the following one-liner:
  
$NewGrid1->Visible = (CCGetUserID() > 0);  
This code should make your grid visible if the value of CCGetUserID is greater than zero and invisible if not.

You may also want to check your else statement.

Luis

_________________
lvalverdeb
CR, GMT-6
XAMPP/Ubuntu/CCS3.2/4
View profile  Send private message
travel-net

Posts: 56
Posted: 04/01/2004, 6:57 AM

Hello Luis,

Changed your oneliner, because it was the other way round.

$NewGrid1->Visible = (CCGetUserID() == 0);

Thanks for it:-)

Frans

View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.