*** Sorry... the first post didn't go through correctly so I am posting again.***
What I have is a Flash front-end with and asp page acting as the connection to the database. I am passing some standard variables from the Flash form to the asp page and then on to the database.
Keep in mind ASP noob...
What I want to know is what do I need to add the the asp page to see if an email field for a record already exists and then send the variable back using the asp page. I want to keep users from overwriting their entries. Basically a single submission to the database per email. I know what to do with it in Flash once I receive it, but how do I get that?
Does any of that make sense?
Here is the code for the ASP page writing to the database from the Flash form.
Obviously any help would be appreciated.
<%
'Declare the variables
name = Request.Form("fname")
email = Request.Form("femail")
address1 = Request.Form("faddress1")
address2 = Request.Form("faddress2")
city = Request.Form("fcity")
state = Request.Form("fstate")
zipcode = Request.Form("fzipcode")
set conn = server.createobject("adodb.connection")
DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)}; "
DSNtemp=dsntemp & "DBQ=" & server.mappath("tonytest.mdb")
conn.Open DSNtemp
'name = "true"
'email = "true"
'address1 = "true"
'address2 = "true"
'city = "true"
'state = "true"
'zipcode = "true"
SQLstmt = "INSERT INTO table1 (name,email,address1,address2,city,state,zipcode)"
SQLstmt = SQLstmt & " VALUES ("
SQLstmt = SQLstmt & "'" & name & "',"
SQLstmt = SQLstmt & "'" & email & "',"
SQLstmt = SQLstmt & "'" & address1 & "',"
SQLstmt = SQLstmt & "'" & address2 & "',"
SQLstmt = SQLstmt & "'" & city & "',"
SQLstmt = SQLstmt & "'" & state & "',"
SQLstmt = SQLstmt & "'" & zipcode & "'"
SQLstmt = SQLstmt & ")"
Set RS = conn.execute(SQLstmt)
Conn.Close
set conn = nothing
response.write("Database record created SUCCESSFUL!")
%>