Sign-up

A

Athmaus

Hey!

I am creating a little signup script and tus far i have run into problems with this line. This line inserts the users information that they entered from the form into the SQL database. Does anyone know what is wrong with this line?

myconn.execute("INSERT regfreeup set signup = '" & Now() & "' , firstname = '" & first & "' , lastname = '" & last & "' , email = '" & email & "' , ordernum = '" & order & "', username = '" & user & "' , pass = '" & pass & "' , site = '" & site & "';")

Thanks!!
 
2

[ + 2 0 r p 3 ]

try this;

<%
myconn.execute("INSERT INTO regfreeup
(signup,firstname,lastname,email,ordernum,username,pass,site) VALUES (" &
Now() & "','" & first & "','" & last & "','" & email & "','" & order & "','"
& user & "','" & pass & "','" & site & "'")
%>

this will still throw an error if your 'signup' field is of type 'date/time'
or your 'ordernum' field is of type 'number'

hope this helps

Athmaus said:
Hey!

I am creating a little signup script and tus far i have run into problems
with this line. This line inserts the users information that they entered
from the form into the SQL database. Does anyone know what is wrong with
this line?
myconn.execute("INSERT regfreeup set signup = '" & Now() & "' , firstname
= '" & first & "' , lastname = '" & last & "' , email = '" & email & "' ,
ordernum = '" & order & "', username = '" & user & "' , pass = '" & pass &
"' , site = '" & site & "';")
 
D

David Berry

You're using update syntax for an insert statement. For Insert you want:

INSERT INTO Table (Values)

For UPDATE you'd use

UPDATE table SET Field1 = value, Field2 = value ...etc


Athmaus said:
Hey!

I am creating a little signup script and tus far i have run into problems
with this line. This line inserts the users information that they entered
from the form into the SQL database. Does anyone know what is wrong with
this line?
myconn.execute("INSERT regfreeup set signup = '" & Now() & "' , firstname
= '" & first & "' , lastname = '" & last & "' , email = '" & email & "' ,
ordernum = '" & order & "', username = '" & user & "' , pass = '" & pass &
"' , site = '" & site & "';")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,156
Messages
2,570,878
Members
47,413
Latest member
KeiraLight

Latest Threads

Top