Dreamweaver MX 2004 ASP Program (4) User registration system

Source: Internet
Author: User
dreamweaver| Program | User Registration

1, in the site to create a new file register.asp to do the registration page, Select the new project "ASP Javascript." Again, because the file conn.aspwas previously built and connected to the database, the file is valid throughout the site. So in your new regist.asp " app"----"database" tab automatically has "conn". This step is to start with the first step, not to be added later (unless you want to connect to another database).

2, then switch to the "bindings" panel, add the recordset, the steps and the same here no longer detailed description. The following figure:

Note: In the above figure there is a "simple ..." button, which is to achieve the above two graphics switch!

3, in the regist.asp page make a very simple form page, content and form table Single-name best and Datasheet table of the field corresponding. The following figure:

code for the corresponding form:

<form name= "Form1" method= "Post" action= "" >
<table width= "339" border= "1" cellspacing= "2" cellpadding= "2" >
<tr>
&LT;TD width= > Username:</td>
&LT;TD width= "204" ><input name= "name"Type=" text "id=" name ></td>
</tr>
<tr>
<td> Password:</td>
<td><input name= " Pass"Type=" text "id=" pass "></td>
</tr>
<tr>
<td> e-Mail:</td>
<td><input name= "Email"Type=" text "id=" email "></td>
</tr>
<tr>
<td> password hint problem:</td>
<td><input name= "question"Type=" text "id=" question "></td>
</tr>
<tr>
<td> Password Prompt answer:</td>
<td><input name= "Answer"Type=" text "id=" Answer "></td>
</tr>
<tr>
<td>OICQ:</td>
<td><input name= "Oicq"Type=" text "id=" Oicq "></td>
</tr>
<tr>
<td>ICQ:</td>
<td><input name= "ICQ"Type=" text "id=" ICQ ></td>
</tr>
<tr>
<td>MSN:</td>
<td><input name= "MSN"Type=" text "id=" MSN ></td>
</tr>
<tr>
<td>URL:</td>
<td><input name= "URL"Type=" text "id=" url "></td>
</tr>
<tr align= "Right" >
&LT;TD colspan= "2" ><input type= "Submission" name= "submit" value= "submitted" >
<input type= "reset" name= "Submit2" value= "reset" ></td>
</tr>
</table>
</form>

5, switch to the server Behaviors panel, because the recordset was previously bound in step 2nd, so there is also a recordset in the label content, which is normal. But we want to insert the record, continue to press "+", select "Insert Record".

6, in the pop-up "Insert Record" dialog box. The "Connection" is chosen by you; " insert into the table" Let it be; " after inserting, go to" means to jump to a page after the success of the prompt, write first, but remember to build this page immediately; "Get value from" is the name of the form you just selected; Inform elements , name is inserted in column name, meaning that the contents of the name input box in the form are inserted into the database table name field.

At this point understand why in step 3 "content and form table single-name the best and database tables and fields corresponding to the", DW automatic intelligent insertion, otherwise you have to choose one point.



7, after the determination, the registration system has been completed in half. (My normal time is less than 1 minutes, the main is a lot of practice) but again think of the registration system is not allowed to duplicate it? It's going to continue to add some content.

In server behavior , continue to press +, and select "Check new user name"inuser authentication .

8, also in the pop-up "check new user Name" dialog box, the User name section select "name" means not to register, of course, can also choose other, such as email, meaning that the same email can only register one. " if it exists, go to" to indicate what to do if there is a repetition of the phenomenon? Then jump to an error page (registbad.htm) prompt. Of course, this page has not been built, first write a document, and just as register.htm Remember to fill up immediately.

9, do some details of the action, such as the form inside which must add ah, which must be a number ah, email address to include a @ and two "." No, wait a minute. Note Select the Submit button first. In the design panel behavior , select Detect form. The pop-up dialog box can be easily set to click on the




10, then do not have just two pages:regist.htm and registbad.htm (as for these two pages I will not be established!) )

regist.htm page content is probably "register successfully, please login "(of course, the login system is the next one I want to write).

registbad.html page content is probably "Oh, sorry, have this user, or trouble you re-register." Return! "

  Also note that the "password hint problem" and "password hint answer" also fill in, later on "Retrieve the password system" will be used.

Register the system to this, the main is to insert records, and verify the effect of the duplicate.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.