Forums
This topic is locked
Help conceptualizing this
Posted 23 Dec 2003 20:49:38
1
has voted
23 Dec 2003 20:49:38 Zachariah Crow posted:
I realize it is just 2 days before xmas but I fear that if I take a break from this problem I'm having I won't even remember what my problem was by the time I'm back here on Jan 5!!In a nutshell:
I have a website that allows people to request information from a school directly. On each school's profile page there is a button that, when clicked, takes them to a personal information page. Once this page is submitted it creates a record in Table1. The next page gathers the information about what they want to know from the school. This information is stored in Table2.
Using a session variable I allow them to request information from several schools during the current session. Each subsequent request takes them directly to the second form (Table2) bypassing the first form (Table 1). Thus Table1 has one entry from this person while Table2 can have any number of entries, tied to Table1 by a unique ID number.
Here is where I'm stuck. What I want to do is prevent the form on the profile page from showing if they've already requested information from this school. I've tried this code which only partially works:
Do While Not rsRFI.EOF
If ((session("MaxID" <> "" And (rsRFI("Inst_id" = rsProfile("Inst_ID"))
Then
Response.Write ""
Else
Response.Write "<form name=form2 action=../RFI/RFI_1.asp><tr><td
class=profileMenuLinks> Click here to get information<br />directly from
this school.<input name=Submit2 type=submit class=menuSubItem value=Request
Information /></td> </tr><tr><td> </td></tr></form>"
End If
rsRFI.movenext
Loop
The above code can allow multiple copies of the form on the page depending on whether or not there is match.
Any conceptual ideas out there? Most appreciated.