Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Closed Thread
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 3rd, 2004, 10:11 AM
Registered User
 
Join Date: Mar 2004
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default I cannot edit user details

I have user profile which is saved in a database and the code as follow:

register.asp




<BASEFONT FACE="Comic Sans MS" COLOR="DarkBlue">
<HTML>
<HEAD>
<SCRIPT language="JavaScript">
<!--
  function VerifyData()
  {
// if (document.frmUser.Username.value == "" || document.frmUser.Password.value == "" ||
// document.frmUser.FirstName.value == "") {
// alert( "FirstName, Username or Password should not be blank" );
// return false;
// }
    if (document.frmUser.Username.value.toUpperCase() == "1BM1BM") {
        alert("Username already in use");
        return false;
    }
    if (document.frmUser.EMailAddress.value == "" ||
        document.frmUser.EMailAddress.value.indexOf ('@', 0) == -1) {
        alert("Enter a valid email address")
        document.frmUser.EMailAddress.focus()
        return false;
    }
    if (document.frmUser.Password.value != document.frmUser.VerifyPassword.value) {
        alert("Your passwords do not match - please reenter");
        document.frmUser.Password.focus()
        return false;
    }
    if (document.frmUser.Username.value.length < 5) {
        alert("Username must be at least 5 characters")
        document.frmUser.Username.focus()
        return false;
    }
    if (document.frmUser.Password.value.length < 5) {
        alert("Password must be at least 5 characters")
        document.frmUser.Password.focus()
        return false;
    }
      for (i=0; i<document.frmUser.length; i++)
        if (document.frmUser.elements[i].value == "" ||
            document.frmUser.elements[i].value == "Invalid") {
        // prompt("***Not all fields are entered***","You must enter all fields")
            alert("Not all fields are entered")
            document.frmUser.elements[i].focus()
            return false;
        }
    return true;
  }
-->
</SCRIPT>

<TITLE>Register.asp: User Registration</TITLE>
</HEAD>
<BODY BGCOLOR="#ffffff">
<CENTER>

</CENTER>
<TABLE BORDER=0 WIDTH=100% BGCOLOR="e8f8f8">
  <TR ALIGN=CENTER>
  <TD><CENTER><H1>New User Registration</H1></CENTER></TD>
  </TR>
</TABLE>

<CENTER>(If you're already registered with us, then click the 'Login' link below.)</CENTER><P>You only need to register with our system if you want to use the personalised digital library. <BR> In order to use these services, please take a few minutes to complete the form below. Once you have done that, you will have full access to the system.




<FORM ACTION="AddUser.asp" NAME="frmUser" METHOD="POST"
              onSubmit="return VerifyData()">
  <TABLE BORDER=0 Width= 100% BGCOLOR="LightBlue">
    <TR>
      <TD WIDTH=20% ROWSPAN=11>&nbsp;</TD>
      <TD>First Name:</TD>
      <TD><INPUT TYPE="Text" NAME="FirstName" VALUE=""
           SIZE="40"></TD>
    </TR>
    <TR>
      <TD>Last Name:</TD>
      <TD><INPUT TYPE="Text" NAME="Surname" VALUE=""
           SIZE="40"></TD>
    </TR>
    <TR>
      <TD>Address:</TD>
      <TD><INPUT TYPE="Text" NAME="Address1" VALUE=""
           SIZE="40"></TD>
    </TR>
    <TR>
      <TD></TD>
      <TD><INPUT TYPE="Text" NAME="Address2" VALUE= ""
           SIZE="40"> </TD>
    </TR>
    <TR>
      <TD>City:</TD>
      <TD><INPUT TYPE="Text" NAME="City" VALUE= ""
           SIZE="40"> </TD>
    <TR>
      <TD>Post Code:</TD>
      <TD><INPUT TYPE="Text" NAME="PostCode" VALUE=""
           SIZE="40"></TD>
    </TR>
    <TR>
      <TD>Country:</TD>
      <TD><INPUT TYPE="Text" NAME="Country" VALUE=""
           SIZE="40"></TD>
    </TR>
    <TR>
      <TD>E-Mail Address:</TD>
      <TD><INPUT TYPE="Text" NAME="EMailAddress" VALUE=""
           SIZE="40"></TD>
    </TR>
     <TR>
      <TD>User Name:</TD>
      <TD><INPUT TYPE="Text" NAME="Username" VALUE=""
           SIZE="40"></TD>
    </TR>
   <TR>
      <TD>&nbsp;<P>Password:</TD>
      <TD VALIGN=bottom><INPUT TYPE="Password" NAME="Password"
                         VALUE="" SIZE="40"></TD>
    </TR>
    <TR>
      <TD>Verify Password:</TD>
      <TD><INPUT TYPE="Password" NAME="VerifyPassword" SIZE="40"></TD>
    </TR>
    <TR>
      <TD></TD>
      <TD ALIGN=CENTER COLSPAN=2><BR>
          <INPUT TYPE="Submit" VALUE="Submit Registration">
              &nbsp;&nbsp;<INPUT TYPE="RESET"></TD>
    </TR>
  </TABLE>
</FORM>


<TABLE BORDER=0 WIDTH=100% BGCOLOR="#e8f8f8">
  <TR ALIGN=CENTER>
    <TD WIDTH=33%>Registration</TD>
    <TD WIDTH=33%><A HREF="Login.asp">Login </A></TD>
    <TD WIDTH=33%><A HREF="Browse.asp">Browse the libary </A></TD
  </TR>
</TABLE>

</BODY>
</HTML>


and the Edituser.asp as follow to adeit the user details. I cannot reach to this code as follow:

<BASEFONT FACE="Comic Sans MS" COLOR="DarkBlue">
<HTML>
<HEAD>
<SCRIPT language="JavaScript">
<!--
  function VerifyData()
  {
// if (document.frmUser.Username.value == "" || document.frmUser.Password.value == "" ||
// document.frmUser.FirstName.value == "") {
// alert( "FirstName, Username or Password should not be blank" );
// return false;
// }
    if (document.frmUser.Username.value.toUpperCase() == "1BM1BM") {
        alert("Username already in use");
        return false;
    }
    if (document.frmUser.EMailAddress.value == "" ||
        document.frmUser.EMailAddress.value.indexOf ('@', 0) == -1) {
        alert("Enter a valid email address")
        document.frmUser.EMailAddress.focus()
        return false;
    }
    if (document.frmUser.Password.value != document.frmUser.VerifyPassword.value) {
        alert("Your passwords do not match - please reenter");
        document.frmUser.Password.focus()
        return false;
    }
    if (document.frmUser.Username.value.length < 5) {
        alert("Username must be at least 5 characters")
        document.frmUser.Username.focus()
        return false;
    }
    if (document.frmUser.Password.value.length < 5) {
        alert("Password must be at least 5 characters")
        document.frmUser.Password.focus()
        return false;
    }
      for (i=0; i<document.frmUser.length; i++)
        if (document.frmUser.elements[i].value == "" ||
            document.frmUser.elements[i].value == "Invalid") {
        // prompt("***Not all fields are entered***","You must enter all fields")
            alert("Not all fields are entered")
            document.frmUser.elements[i].focus()
            return false;
        }
    return true;
  }
-->
</SCRIPT>

<TITLE>Register.asp: User Registration</TITLE>
</HEAD>
<BODY BGCOLOR="#ffffff">
<CENTER>

</CENTER>
<TABLE BORDER=0 WIDTH=100% BGCOLOR="e8f8f8">
  <TR ALIGN=CENTER>
  <TD><CENTER><H1>Update User Registration</H1></CENTER></TD>
  </TR>
</TABLE>

Please change your registration information as listed below<P>


<FORM ACTION="EditUser.asp" NAME="frmUser" METHOD="POST"
              onSubmit="return VerifyData()">
  <TABLE BORDER=0 Width= 100% BGCOLOR="lightblue">
    <TR>
      <TD WIDTH=20% ROWSPAN=11>&nbsp;</TD>
      <TD>First Name:</TD>
      <TD><INPUT TYPE="Text" NAME="FirstName" VALUE=""
           SIZE="40"></TD>
    </TR>
    <TR>
      <TD>Last Name:</TD>
      <TD><INPUT TYPE="Text" NAME="Surname" VALUE=""
           SIZE="40"></TD>
    </TR>
    <TR>
      <TD>Address:</TD>
      <TD><INPUT TYPE="Text" NAME="Address1" VALUE=""
           SIZE="40"></TD>
    </TR>
    <TR>
      <TD>Address:</TD>
      <TD><INPUT TYPE="Text" NAME="Address2" VALUE=""
           SIZE="40"></TD>
    </TR>
    <TR>
      <TD>City:</TD>
      <TD><INPUT TYPE="Text" NAME="City" VALUE=""
           SIZE="40"></TD>
    </TR>
    <TR>
      <TD>Post Code:</TD>
      <TD><INPUT TYPE="Text" NAME="PostCode" VALUE=""
           SIZE="40"></TD>
    </TR>
    <TR>
      <TD>Country:</TD>
      <TD><INPUT TYPE="Text" NAME="Country" VALUE=""
           SIZE="40"></TD>
    </TR>
    <TR>
      <TD>E-Mail Address:</TD>
      <TD><INPUT TYPE="Text" NAME="EMailAddress" VALUE=""
           SIZE="40"></TD>
    </TR>
     <TR>
      <TD>User Name:</TD>
      <TD><INPUT TYPE="Text" NAME="Username" VALUE=""
           SIZE="40"></TD>
    </TR>
   <TR>
      <TD>&nbsp;<P>Password:</TD>
      <TD VALIGN=bottom><INPUT TYPE="Password" NAME="Password"
                         VALUE="" SIZE="40"></TD>
    </TR>
    <TR>
      <TD>Verify Password:</TD>
      <TD><INPUT TYPE="Password" NAME="VerifyPassword" SIZE="40"></TD>
    </TR>
    <TR>
      <TD></TD>
      <TD ALIGN=LEFT COLSPAN=2><BR>
          <INPUT TYPE="Submit" VALUE="Submit Registration">
              &nbsp;&nbsp;<INPUT TYPE="RESET"></TD>
    </TR>
  </TABLE>
</FORM>


<TABLE BORDER=0 WIDTH=100% BGCOLOR="#e8f8f8">
  <TR ALIGN=CENTER>
    <TD WIDTH=33%><A HREF="brows.asp">Brows the library</A></TD>
    <TD WIDTH=33%><A HREF="Login.asp">Login</A></TD>
    <TD WIDTH=33%>Registration</TD>
  </TR>
</TABLE>

</BODY>
</HTML>


Can you please help me how to edit the user details




Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
user log details... anukagni Access 10 November 28th, 2006 01:51 PM
Edit User Profile - email garydarling BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 7 September 29th, 2006 06:58 AM
Chnaging user details andy11983 Classic ASP Basics 5 April 25th, 2004 01:24 PM
/proc details? jrichemont BOOK Beginning Linux Programming, 3rd Edition 1 April 13th, 2004 10:46 AM
Box in details sporkman43 Crystal Reports 0 January 15th, 2004 03:50 PM



All times are GMT -4. The time now is 07:17 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.