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 -> General/Other

 how to use ccaddparam in php?

Print topic Send  topic

Author Message
CodeChargenewbie

Posts: 114
Posted: 02/12/2008, 7:42 AM

I read the documentation, but it's still not quite clear. Specifically, how do I know the name of querystring itself? Must I use ccgetquerystring as the first argument or is there another way?
I wanted to add a parameter on the client-side, until I realized all the parameters are in ccsForm. I could append parameters in the URL, but there's no way to retrieve the parameters in ccsForm on the client-side...

...Which is why I'm doing it all on the server-side. If there's a way to remove parameters from ccsForm array, a la CCGetQueryString, on the client-side (and I suspect there isn't), that'd be great.

thx
View profile  Send private message
roeya


Posts: 181
Posted: 02/14/2008, 12:26 PM

CodeChargenewbie

I am not a PHP programmer (We use Perl which from CCS point of view is similar enough)

So how to use it ?

First start somewhere, it can be any url - current url, the $Redirect or some custom string you write (e.g. 'http://google.com/'). regrading the current QueryString ?
Just use the CCGetQueryString() function
now lets say the query string currently is
http://localhost/myapp/showhouse.php?house_id=50
and you want to add a parameter called room_id with a value of 15;
You do the following
$Redirect = CCAddParam(CCGetQueryString(), 'room_id', 15);
$Redirect is a global varaible, just before displaying a page the value of this variable is checked. if it is empty the page is displayed, however if it has a value then the script will return a redirect HTTP command to the browser and tells the browser to go get the page pointed by the $Redirect

You can use CCAddParam also to add parametes to link manually
search Help of CCS for "Dynamically Modify a Hyperlink"
and "Dynamically Redirect Users to Another Page"

Improtant: you need to set $Redirect before the vlaue is tested. Good events for this are
OnInitialize, Before/After/ Select Insert Update etc.
Before show is usually too late....
_________________
http://www.infoneto.com/
View profile  Send private message
CodeChargenewbie

Posts: 114
Posted: 02/20/2008, 6:42 AM

ok..thank you much, btw
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.

Web Database

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.