Here is all the code for this page - to give you brief login using uname and pswd, - passed to userwelcome page which queries for userID which is then stored as session passedonto profile diplay page where userID is taken from session and passed on as hdden field in form. UserID appears on final page the one listed below as you will not from my last message - hope I have not confused situation .
<%
'Collating all the information from the form using the the request command.
userID=session("userID")
fname = TRIM(request("fname"))
sname = TRIM(request("sname"))
uname = TRIM(request("uname"))
pswd = TRIM(request("pswd"))
addra = TRIM(Request("addra"))
addrb = TRIM(Request("addrb"))
county = TRIM(Request("county"))
postcode = TRIM(Request("postcode"))
telno = TRIM(Request("telno"))
fax = TRIM(Request("fax"))
email=Trim(Request("email"))
act=0
'Error checking of the element that make up the form
if fname = "" then
strError = strError & "Enter your first name.<BR>"
end if
if sname = "" then
strError = strError & "Enter your surname.<BR>"
end if
if uname = "" then
strError = strError & "Enter a user name.<BR>"
end if
if pswd = "" then
strError = strError & "Enter a password .<BR>"
end if
if addra = "" then
strError = strError & "Enter in your address line 1.<BR>"
end if
if addrb = "" then
strError = strError & "Enter in your address line 2.<BR>"
end if
if county = "" then
strError = strError & "Enter in your City or County.<BR>"
end if
if postcode="" then
strError = strError & "Enter your Postcode <BR>"
end if
if telno = "" then
strError = strError & "Enter your Telephone<BR>"
end if
if email="" then
strError = strError & " Enter your email<br>"
else
if (instr(1, email,"@")=0) or (instr(1, email, ".")=0) then
strError = strError & " Invalid email<br>"
end if
end if
' if there are any error they will be picked up by this next term
if strError <> "" then
%>
<!-- Note the error -->
<b> There is an error in your registration request: </b> </span>
<p> <span class="error">
<%
' Write out the error messages
Response.Write strError
%>
</span> <br>
Click <a href="userupdate.asp" class="purp">here</a>
to update.
<%
' If there are any probelms with form the information is placed into sessionvariable
' for when you are sent back to last page.
Session("fname") = request("fname")
Session("sname") = Request("sname")
Session("uname") = Request("uname")
Session("pswd") = Request("pswd")
Session("addra") = Request("addra")
Session("addrb") = Request("addrb")
session("county") = Request("county")
Session("postcode") = Request("postcode")
Session("telno") = Request("telno")
Session("fax") = Request("fax")
Session("email") = Request("email")
else
%>
<font> <% = userID %></font>
<%
Set MyConn = Server.CreateObject("ADODB.Connection")
MyConn.Open = "DRIVER={Microsoft Access Driver (*.mdb)};" & _
"DBQ=" & Server.MapPath("db2.mdb") & ";"
sql1 = "Update users Set fname='" & request.form("fname") & "', sname='" & request.form("sname") & "' , uname='" & request.form("uname") & "', pswd='" & request.form("pswd") & "', addra='" & request.form("addra") & "', addrb='" & request.form("addrb") & "', county='" & request.form("county ")& "', postcode='" & request.form("postcode") & "', telno='" & request.form("telno") & "', fax='" & request.form("fax") & "', email='" & request.form("email") & "', act=" & request.form("act") & " Where userID=" & request.form("userID")& ""
Response.Write(sql1)
Response.End
MyConn.Execute(sql1)
%>