Guest calebcassler Posted December 9, 2010 Share Posted December 9, 2010 I am gathering data from a form that contains the following code <form action="doreg.asp" method="get"> <input type="hidden" value="<% =programid %>" id="programid" name="programid"> Doreg.asp - <%Dim programidDim subjectDim fromemailDim toemailDim messagebodyRequest.Querystring("programid") = programidSelect Case programid Case "topfarmer" Set regMail= CreateObject("CDO.Message") regMail.Subject= "Top Farmer Registration Confirmation" regMail.From= "xxx@xxx.com" regMail.To= Request.QueryString("email") regMail.HTMLBody = "Thank you for Registering" regMail.Send set regMail=nothing Case "farmmngmt" Set regMail= CreateObject("CDO.Message") regMail.Subject= Request.QueryString("fname") & " " & Request.QueryString("lname") & " has registered for the xxx" regMail.From= Request.QueryString("email") regMail.To= "xxx@xxx.edu" regMail.Bcc= "" regMail.HTMLBody = "Test" regMail.Send set regMail=nothing Case "landvalues" Set regMail= CreateObject("CDO.Message") regMail.Subject= Request.QueryString("fname") & " " & Request.QueryString("lname") & " has registered for the xxx" regMail.From= Request.QueryString("email") regMail.To= "xxx@xxx.edu" regMail.Bcc= "" regMail.HTMLBody = "Test" regMail.Send set regMail=nothing Case else Response.Redirect("error.asp")End SelectResponse.Redirect("confirmation.asp")%> However whenever I do this it always goes to Case else whether or not the "programid" equals one of the other cases. If I manually change "Request.Querystring("programid") = programid" to just "programid = "landvalues" or one like that it works, which led me to believe the problem lied in the "Request.Querystring("programid") = programid" part, but I'm unsure what could be going wrong. The code is gathering all the other data correctly, why wouldn't it get "programid"? Link to comment Share on other sites More sharing options...
jeffman Posted December 9, 2010 Share Posted December 9, 2010 Should this statement be reversed:Request.Querystring("programid") = programidtoprogramid = Request.Querystring("programid") Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.