Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can Someone help with this edit script?

Status
Not open for further replies.

Flapman

Technical User
Jul 6, 2001
18
US
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=&quot;lockpage.asp&quot;-->
<!-- #Include File=&quot;connect.asp&quot;-->
<%
If Request(&quot;Action&quot;) = EditButton Then
Set DB = Connect0 SQL = &quot;UPDATE Login SET FirstName = I'
+ Request(&quot;FirstName&quot;) + &quot;, LastName = &quot; _
+ Request(&quot;LastName&quot;) + &quot;I, Password = &quot; _
+ Request(&quot;Password&quot;)+ &quot;I, Email = I(1 + Request(&quot;Emai1&quot;) + WI WHERE Username-= 'I( + Session(SiteID + &quot;Username&quot;) + 'I'
Response.Write SQL Set RS = DB.Execute (SQL)
Response-Redirect &quot;welcome.asp&quot;
Else
Set DB = Connect0 SQL = &quot;SELECT FirstName, LastName, Password, Email FROM Login WHERE Username = 'I' + Session (SiteID + &quot;Username&quot;) + &quot;'
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(&quot;Error&quot;) %>i/B>
<FORM ACTION=&quot;<%= Request.ServerVariables(&quot;PATH_INFO&quot;) %>&quot; METHOD=&quot;POST&quot;> <P>First Name:<BR>
<INPUT TYPE=&quot;text&quot; NAME=&quot;FirstName&quot; VALUE=&quot;<%= Session(SiteID + &quot;FirstName&quot;) %>&quot; SIZE=&quot;20&quot; MAXCHARS=&quot;20&quot;>
<P>Last Name:<BR>
<INPUT TYPE=&quot;text&quot; NAME=&quot;LastName&quot; VALUE=&quot;<%= Session(SiteID + &quot;LastName&quot;) %>&quot; SIZE=&quot;20&quot; MAXCHARS=&quot;20&quot;>
<P>Username:<BR>
<INPUT TYPE=&quot;text&quot; NAME=&quot;Username&quot; VALUE=&quot;<%= Session(SiteID + &quot;Username&quot;) %>&quot; SIzE=&quot;20&quot;
MAXCHARS=&quot;20&quot;>
<P>Password:<BR>
<INPUT TYPE=&quot;text&quot; NAME=&quot;Password&quot; VALUE=&quot;<%= Session(SiteID + &quot;Password&quot;) %>&quot; SIZE=&quot;20&quot;
MAXCHARS=&quot;20&quot;> <P>Email:<BR>
<INPUT TYPE=&quot;text&quot; NAME=&quot;Email&quot; VALUE=&quot;<%= Session(SiteiD + &quot;Email&quot;) %>&quot; SIZE=&quot;20&quot; MAXCHARS=&quot;20&quot;>
<P><INPUT TYPE=&quot;Submit&quot; NAME=&quot;Action&quot; VALUE=&quot;<%= EditButton %>&quot; SIZE=&quot;20&quot; MAXCHARS=&quot;20&quot;>
</FORM>
<% WriteNavigationBar %>
</BODY>
</HTML>

 
u shouldn't use this
(portion of code cut)
<INPUT TYPE=&quot;text&quot; NAME=&quot;FirstName&quot; VALUE=&quot;<%= Session(SiteID + &quot;FirstName&quot;) %>&quot; SIZE=&quot;20&quot; MAXCHARS=&quot;20&quot;>

must be like this
<INPUT TYPE=&quot;text&quot; NAME=&quot;FirstName&quot; VALUE=&quot;<%= Session(SiteID + rs(&quot;FirstName&quot;)) %>&quot; SIZE=&quot;20&quot; MAXCHARS=&quot;20&quot;>

the rest should be like that too. Take note of the SiteID thingy, it's confusing.

----------------------------------------
There's no good nor evil, it's all in the mind.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top