HI everyone
Been trying to get sessions variables happening
have set up a collection called 'shoppingcart'
now im trying to get my add button to work

after a user chooses a symptom they can return to the alphabete key and choose
another letter and choose another symptom. Once the user has choosen all their
symptoms they can procede to a form to complete other personal information.

i can get the abc...z working fine pulling data from the database
then on the next to each entry i originally had a checkbox which i thought the
user could check and add with a button.
problem is that i cant seem to get the ad button working properly.

I created a datasource called #application.ds# which dsn is my symptom table
Im quite sure the problem is in the button code but i cant work it out
Any advice or help would be most appreciated

ABC...Z Page Code
<cfquery name="q1" datasource="#application.ds#">
select distinct left (symptom, 1) AS firstletter
from symptoms
order by left (symptom, 1)
</cfquery>
<cfif q1.recordcount>
<cfoutput query="q1">
<font size=6 face=arial><b><a
href="categoryDetail.cfm?firstletter=#firstletter# ">#firstletter#</a></b></font>
</cfoutput>
</cfif>

Button Code

<cfparam name="formVal" default="Add to Cart">
<cfparam name="symptom" default="">


<cfif isdefined("form.submit")>
<cfif form.submit eq FormVal>
<cf_addItem symptom="#form.addsymptom#">

</cfif>
</cfif>

<cfif len(id)
<cfoutput>
<center>
<FORM action="#getfilefrompath(cgi.script_name)#?firstle tter=#firstletter#"
method="post">
<input type="hidden" name="addsymptom" value="#q3.symptom#">
<input type="submit" name="submit" value="#formVal#">
</form>
</center>
</cfoutput>
</cfif>


Add Item Code


<cfif isdefined("attributes.symptom") >
<cfscript>
if (not(isdefined("session.cart"))) {
session.cart = structnew();
}

tempvalue = listtoarray('#attributes.symptom#');

if (not(structKeyExists(session.cart, attributes.symptom))) {
StructInsert(session.cart,attributes.symptom,tempv alue);
}
else {
tempvalue[4]=session.cart[attributes.symptom][4];
StructUpdate(session.cart,attributes.symptom,tempv alue);
}
</cfscript>
</cfif>

Results Page

<cfparam name="URL.firstletter" default="Z">
<cfparam name="PageNum_q3" default="1">
<cfquery name="q3" datasource="#application.ds#">
select symptom, ??
from symptoms
where symptom like '#url.firstletter#%'
</cfquery>
<cfoutput query="q3">
<b><i><font face="arial" size=4>
<input type="checkbox" name="checkbox" value="checkbox">
#q3.symptom#</font></i></b><br>
<a href="itemDetail.cfm?#q3.symptom#"></a>


<!--- Insert Shopping Cart Functionality Here --->
</cfoutput><cfoutput query="q3">
</cfoutput><cfoutput query="q3">
<cfinclude template="addButton.cfm">

</cfoutput>
<a href="catalog_getCategories.cfm?firstletter=#first letter#"><< Back</a>