I have this edit script for an Access Database. The first 3 fields will display the information for FirstName LastName and UserName, but thr remaining fields don't display their information like they should. I've tried everything and for some reason those edit fields will not display thier info.
See Below:
<%
Response.Buffer = True Response.Expires = -1000 %>
<!-- #Include File="lockpage.asp"-->
<!-- #Include File="connect.asp"-->
<%
If Request("Action" = EditButton Then
Set DB = Connect0 SQL = "UPDATE Login SET FirstName = I'
+ Request("FirstName" + ", LastName = " _
+ Request("LastName" + "I, Password = " _
+ Request("Password"+ "I, Email = I(1 + Request("Emai1" + WI WHERE Username-= 'I( + Session(SiteID + "Username" + 'I'
Response.Write SQL Set RS = DB.Execute (SQL)
Response-Redirect "welcome.asp"
Else
Set DB = Connect0 SQL = "SELECT FirstName, LastName, Password, Email FROM Login WHERE Username = 'I' + Session (SiteID + "Username" + "'
Set RS = DB.Execute (SQL) End If $>
<HTML>
<HEAD>
<TITLE><%= SiteTitle %> Members Section</TITLE> <STYLE>
body, pr td, li (font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; } </STYLE> </HEAD>
<BODY>
<Hl><%= SiteTitle %></Hl>
<H2>Edit your profile</H2>
<B><%= Request("Error" %>i/B>
<FORM ACTION="<%= Request.ServerVariables("PATH_INFO" %>" METHOD="POST"> <P>First Name:<BR>
<INPUT TYPE="text" NAME="FirstName" VALUE="<%= Session(SiteID + "FirstName" %>" SIZE="20" MAXCHARS="20">
<P>Last Name:<BR>
<INPUT TYPE="text" NAME="LastName" VALUE="<%= Session(SiteID + "LastName" %>" SIZE="20" MAXCHARS="20">
<P>Username:<BR>
<INPUT TYPE="text" NAME="Username" VALUE="<%= Session(SiteID + "Username" %>" SIzE="20"
MAXCHARS="20">
<P>Password:<BR>
<INPUT TYPE="text" NAME="Password" VALUE="<%= Session(SiteID + "Password" %>" SIZE="20"
MAXCHARS="20"> <P>Email:<BR>
<INPUT TYPE="text" NAME="Email" VALUE="<%= Session(SiteiD + "Email" %>" SIZE="20" MAXCHARS="20">
<P><INPUT TYPE="Submit" NAME="Action" VALUE="<%= EditButton %>" SIZE="20" MAXCHARS="20">
</FORM>
<% WriteNavigationBar %>
</BODY>
</HTML>
See Below:
<%
Response.Buffer = True Response.Expires = -1000 %>
<!-- #Include File="lockpage.asp"-->
<!-- #Include File="connect.asp"-->
<%
If Request("Action" = EditButton Then
Set DB = Connect0 SQL = "UPDATE Login SET FirstName = I'
+ Request("FirstName" + ", LastName = " _
+ Request("LastName" + "I, Password = " _
+ Request("Password"+ "I, Email = I(1 + Request("Emai1" + WI WHERE Username-= 'I( + Session(SiteID + "Username" + 'I'
Response.Write SQL Set RS = DB.Execute (SQL)
Response-Redirect "welcome.asp"
Else
Set DB = Connect0 SQL = "SELECT FirstName, LastName, Password, Email FROM Login WHERE Username = 'I' + Session (SiteID + "Username" + "'
Set RS = DB.Execute (SQL) End If $>
<HTML>
<HEAD>
<TITLE><%= SiteTitle %> Members Section</TITLE> <STYLE>
body, pr td, li (font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; } </STYLE> </HEAD>
<BODY>
<Hl><%= SiteTitle %></Hl>
<H2>Edit your profile</H2>
<B><%= Request("Error" %>i/B>
<FORM ACTION="<%= Request.ServerVariables("PATH_INFO" %>" METHOD="POST"> <P>First Name:<BR>
<INPUT TYPE="text" NAME="FirstName" VALUE="<%= Session(SiteID + "FirstName" %>" SIZE="20" MAXCHARS="20">
<P>Last Name:<BR>
<INPUT TYPE="text" NAME="LastName" VALUE="<%= Session(SiteID + "LastName" %>" SIZE="20" MAXCHARS="20">
<P>Username:<BR>
<INPUT TYPE="text" NAME="Username" VALUE="<%= Session(SiteID + "Username" %>" SIzE="20"
MAXCHARS="20">
<P>Password:<BR>
<INPUT TYPE="text" NAME="Password" VALUE="<%= Session(SiteID + "Password" %>" SIZE="20"
MAXCHARS="20"> <P>Email:<BR>
<INPUT TYPE="text" NAME="Email" VALUE="<%= Session(SiteiD + "Email" %>" SIZE="20" MAXCHARS="20">
<P><INPUT TYPE="Submit" NAME="Action" VALUE="<%= EditButton %>" SIZE="20" MAXCHARS="20">
</FORM>
<% WriteNavigationBar %>
</BODY>
</HTML>