CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> Archive -> GotoCode Archive

 Get a variable from a link?

Print topic Send  topic

Author Message
Nearly Normal Warren
Posted: 09/21/2003, 9:46 AM

Does anyone know how to pick up a variable from a link?

If a customer clicks a link in my email to him and the link contains his account number how do I format that link and how do I access the account number in the PHP program he links to?

Format the link: perhaps something like:
www.website.com/program.php?acct=12345 or www.website.com/program.php/acct=12345

....then how does the PHP program address "acct"?
nhoj
Posted: 09/21/2003, 11:30 AM

Nearly,
>>Format the link: perhaps something like:
www.website.com/program.php?acct=12345 or www.website.com/program.php/acct=12345
<<

www.website.com/program.php?acct=12345
is the correct way.
for help with the format of links and such I would start at this link.
http://www.w3schools.com/

and for the PHP I would look at
http://www.php.net/tut.php

Hank.
Nearly Normal Warren
Posted: 09/21/2003, 11:50 AM

Thanks!

This from http://us4.php.net/manual/en/language.variables.external.php.

GET also applies to the QUERY_STRING (the information after the '?' in an URL). So, for example, http://www.example.com/test.php?id=3 contains GET data which is accessible with $_GET['id']. See also $_REQUEST and import_request_variables().

RonB
Posted: 09/21/2003, 12:21 PM

then how does the PHP program address "acct"?

use the CCgetParam() function to get the variable and use it in any way you want.

Or, if the parameter is to be processed in a grid set a parameter in the query for that grid with parameter source url

Ron

   


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.