CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 CCGetParam example

Print topic Send  topic

Author Message
traef06

Posts: 4
Posted: 11/11/2007, 10:36 AM

I've got a page that is correctly setting the hyperlink and when clicked on it takes me to the page by passing the param, but I can't find any example of how to read that passed param and do a query with it so I can display the information on the new page.

Does anyone have some example php code?

I tried adding Custom Code but I'm not sure wht I'm doing there. I added the line:

my $UserString = CCGetParam("UserString", "");

But that somehow isn't working. I think I have the sql query set correctly but it needs this passed param in order to perform.

Thank you in advance.
_________________
Thomas J. Raef
e-Based Security, LLC
"You're either hardened, or you're hacked!"
http://www.ebasedsecurity.com
View profile  Send private message
aondecker

Posts: 58
Posted: 11/12/2007, 1:06 PM

Quote traef06:
I've got a page that is correctly setting the hyperlink and when clicked on it takes me to the page by passing the param, but I can't find any example of how to read that passed param and do a query with it so I can display the information on the new page.

Does anyone have some example php code?

I tried adding Custom Code but I'm not sure wht I'm doing there. I added the line:

my $UserString = CCGetParam("UserString", "");

But that somehow isn't working. I think I have the sql query set correctly but it needs this passed param in order to perform.

Thank you in advance.


$UserString = CCGetParam("UserString","") will get you your parameter that is passed. The parameter is Case sensitive so make sure your case is correct.


To do a query on the what is passed you can use code like this:

$DB1 = new clsdbDATABASE_NAME
$SQL1 = "select * from table where some_field = ".$CCGetParam("UserString");
$DB1->query($SQL1);
$RS1 = $DB1->next_record();
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.