troubleshooting Question

input form not working

Avatar of Graeme
GraemeFlag for Australia asked on
41 Comments3 Solutions216 ViewsLast Modified:
Hi All, I have copied some working code from 1 page to another, but I cant seem to get it to work

Set PreRegister=oConn.Execute("SELECT * FROM events,locations,codes WHERE event_location=location_ID AND event_code=code_short AND event_code<>'TEST' AND event_code<>'SPEC' AND code_live=TRUE AND event_live=TRUE AND event_start>Now() AND event_prereg=TRUE")
<input type=text name=email"&PreRegister("event_ID")&" value='' size=26 placeholder='Email Address' class=inputbox>
<input type=hidden name=event"&PreRegister("event_ID")&" id=eventID"&PreRegister("event_ID")&" value=''>
<input type=submit name='register' value='Register!' onclick='document.getElementById('eventID"&PreRegister("event_ID")&"').value='"&PreRegister("event_ID")&"'' class=inputsubmit>

sql query
If Request.Form("register")="Register!" Then
	Set EventIDs=oConn.Execute("SELECT * FROM events")
	Do Until EventIDs.EOF
	email=Request("email" & eventID)
	If eID<>"" and isNumeric(eID) Then
'	check if email address exists
		Set checkemailexist=oConnAE.Execute("SELECT * FROM pax_contacts,pax_register WHERE pax_contacts.pax_ID=pax_register.pax_ID AND event_ID="&eID&" AND pax_contact='"&email&"'")
		If Not checkemailexist.EOF Then
			Response.Write("Your email address has already registered for this event")
' send email to client saying thank you for signing up for the news letter and opportunity to complete user account.
			oConnAE.Execute("INSERT INTO pax(pax_fname) VALUES('GP Fan')")
			Set NewPax=oConnAE.Execute("SELECT @@IDENTITY AS New_Pax_ID")
			oConnAE.Execute("INSERT INTO pax_contacts(pax_ID,contact_type,pax_contact,contact_primary) VALUES("&PaxID&",2,'"&email&"',TRUE)")
			oConnAE.Execute("INSERT INTO pax_register(pax_ID,event_ID,reg_date,reg_time) VALUES("&PaxID&","&eID&","&Now()&","&Time()&")")
			Response.Write("email check works and no email in db")
		End If
	End If
End If

For some reason I cannot get Lines 5 & 6 to work, help please?

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 3 Answers and 41 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 41 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros