Help with session variables

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • colinod
    Contributor
    • Nov 2007
    • 347

    Help with session variables

    I have a shopping cart type of thing on my website where you can shortlist mp3's and then email the list to another person.

    can be seen here



    you can see the list of mp3 and shortlist button this all works fine but i am now trying to add the facility to shortlist an artist and not a clip, i have a shortlist button at the top this works and adds the artists id number to a seperate session variable.

    My problem is i have been asked if i can record the voicetype selected on the artists page at the top where it changes the clips on the page so when the link is emailed and you will receive a link to the artist page it will take you to the voicetype you had selected when you shortlisted them

    the asp code is

    Code:
    <%
    if InStr(session("recordsInCart"), ","&request.form("recordNum")) = 0 then 
       session("recordsInCart") = session("recordsInCart") + request.form("recordNum") &","
    else 
       'do nothing
    end if 
    %>
    <%
    if InStr(session("artistsInCart"), ","&request.form("artistNum")) = 0 then 
       session("artistsInCart") = session("artistsInCart") + request.form("artistNum") &","
    else 
       'do nothing
    end if 
    Response.Write(session("artistsInCart"))
    %>
    form that adds the artist to shortlist is

    Code:
    <form action="boys2.asp?id=<% Response.Write yaketyRecordset("idnumber") %>&voicetype=<% Response.Write (voiceid) %>" method="post">
          <input type="hidden" name="artistNum" value="<%=yaketyRecordset("idnumber")%>">
          <% if InStr(session("artistsInCart"), ","&yaketyRecordset("idnumber")) > 0 then %>
          <span class="shortlisted">SHORTLISTED</span>
          <%else %>
          <INPUT type="submit" alt="Add to shortlist" border="0" value="SHORTLIST">
          <%end if%>
        </form>
    form that adds mp3 to shortlist is

    Code:
    <form action="boys2.asp?id=<% Response.Write yaketyRecordset("idnumber") %>&voicetype=<% Response.Write (voiceid) %>" method="post">
          <input type="hidden" name="recordNum" value="<%=yaketyRecordset("idnumbermp3")%>">
          <% if InStr(session("recordsInCart"), ","&yaketyRecordset("idnumbermp3")) > 0 then %>
          <span class="shortlisted">SHORTLISTED</span>
          <%else %>
          <INPUT type="submit" alt="Add to shortlist" border="0" value="SHORTLIST">
          <%end if%>
        </form>
    my asp is good but im a bit lost with this and am sure it must be possible

    any help thanks
Working...