GET or some built-in method of getting a passed URL parameter?

Hi. Do I use $_GET[‘siteid’] in my event code, or is there some magic GET built into the SC applications? Something that saves incoming data as variables? It is not clear to me from what I have been able to search.

I want to make a www.blahblah.com/index.php?siteid=256 or something, so people can bookmark specific site info and get to it directly. I would then store that into a global variable for the whole application to use it as part of the WHERE statements right?

Thanks,
Jamie

Re: GET or some built-in method of getting a passed URL parameter?

You can put the following code in the form onScriptInit

[siteid] = $_GET['siteid']

In your form that is called, place:


siteid = '[siteid]'

In the Form/SQL/Where Condition

It will load the form as requested.

Regards,
Scott.

Re: GET or some built-in method of getting a passed URL parameter?

Thanks Scott,
I appreciate your help. I have 16 days left on the eval copy and am trying to run thru as many tests as I can. I used to use PHPMaker, which helped me create some good systems. However, SC appears a bit more powerful and the community forum better. I also do custom PHP coding, so I am intrigued with SC’s blank application, as well as its more extensive event system. The macros look good too.

How forth coming is the company with updates and new releases. I see v6 is coming out soon? Do you have any experience with how smoothly those new releases work with existing projects. I am not expecting 100% perfection on any software , BUT I want to avoid train wrecks too :slight_smile:

Also, have people developed Paypal and credit card payment systems that work with SC? I have used Paypal in all of my custom php projects to date, but some clients want full credit card / merchant account type systems. I need something as easy as possible.

Thanks again,
Jamie