Gossamer Forum
Home : Products : DBMan : Customization :

SSI & url variables

Quote Reply
SSI & url variables
Hi, it has been some time since i've been back here.

I have been working on code that would allow users to come to my site from other sites and using a variable from the URL I would know what site they came from and could reference information about that site. Does that make any sense? In other words, in the URL there will be:

http://www.mydomain.com?abc123

abc123 refers to a record within my dbman database. What I would like is for the shtml file to look at that variable, search for it in the database and present certain information about that db record. This is what I have so far in my shtml file:

Code:
<!--#set var="NAME" value="$QUERY_STRING" -->
<!--#if expr="\"$name\"= \"\"" -->
<strong>Welcome</strong><br/>
<!--#else -->
<!--#include virtual="/cgi-bin/db/db.cgi?db=default&uid=default&view_records_org=1&sb=2&so=ascend&ID="-->
<!--#endif -->

In the code, if there is no "?abc123" it simply says "Welcome" to the user. Otherwise if there is, I would like the system to check the database and present information--this part works (once I get the include part working). The problem I believe I'm running into is that I cannot assign a variable to an include statement. For example variable in this case would be abc123 which would match an ID in the database. Is there any other way that I could accomplish this same thing...perhaps by using something other than a SSI include statement?