-
Make a method in the submit button that either it won't be submitted to the database.
Do a database insertion operation in the method.
-
There are two ways to deal with it.
1.Use js to verify whether the data is empty on the page submitted on the front-end!
2.In the back-end verification, if you are using AJAX to submit data, then you can send back the json result to notify the front-end page to fill in the required items, if you submit it with a form, you can only prompt it through the js pop message, and the page can be rolled back to deal with it.
if "submit")="Add" then
if trim(request("summary")) = "" then
end if
sql="select * from [summary]"
set rs="")
sql,conn,1,3
rs("title")=request("title")
rs("summary")=txtshift(request("summary"))
rs("plan")=txtshift(request("plan"))
rs("loginid")=session("loginid")
rs("ip")=getip()
end if
-
You've got a little bit of a problem.
There is a problem with your third file - rs ("user")="zhanghao"
Here"zhanghao"It's a constant that you define casually, and you don't receive it in the form on the page.
value. Received value: zhanghao=trim("zhanghao"Add value: rs("admin")=zhanghao** in you, I helped you sort it out, you just copy it.
dim rs
dim sql
dim count
set rs="")
sql = "select * from admin"
sql,conn,1,3
rs("user")=trim("zhanghao"))set rs=nothing
-
The third file:
rs("user")="zhanghao" 'In this case, the request method should be used to get the passed value.
Changed to rs ("user")="zhanghao"If it is the data that comes from the post, it is obtained by the method; If it's a get method, use the method to get the data.
For example:"zhanghao")
Another possibility is that your primary key is set to this user, and the primary key cannot be duplicated.
-
The data in quotation marks is regarded as a string, and you submit it to the table only to submit the letters zhanghao, and if you want to submit the data of the form, you need to use the request object to get the value of the form name.
trim("zhanghao"trim means to remove the spaces at both ends.
-
It's not that complicated.
Only one place to change.
Put rs("user")="zhanghao"
Changed to rs ("user")=trim(request("zhanghao"))
You're guaranteed to get it done.
-
Did you report any mistakes after you executed it? There is basically nothing wrong with just looking at **, there is no way to use your **test.
Could there be a database field type that is incorrect?
-
You should get the submitted information in order to display it plus <%xm=request("Name"%> and so on, and then you can use this value in **, or in .
=xm%>
-
Your file is an empty file with nothing in it. It should include a statement to receive the submitted information and a statement to display the information.
For example, receive a message, % name="name") %
Displays information, %name %>
Note: Generally do not use Chinese, it is better to rewrite it into English. A look here might solve the problem:
-
You shouldn't be right-clicking on an HTML page.
The right way to do it is:
Open the IIS Manager.
Find your log and right-click to browse the page just now and submit.
-
I don't know if it's a problem; Or write out.
-
To put it simply, you need to do the following steps:
1.The form page is used to determine whether the text field is empty.
2.Submit the vb script of the page to determine whether the required items on the previous page are recorded and are missing.
-
Determine whether the action is get or post before update, and do not execute if it is get. Hengmaoyu generally has another page to process the data submitted to Wuhui. Tell the paragraph.
Below is saved as.
set conn="") >>>More
Landlord Your fault should be here:
now()&"'If you have a SQL database, use gedate(). >>>More
%if request("username")="" then%>elseset rec="")
sql="select * from user where username = '"& request("username") &"'" >>>More
dim startime,conn,connstr,db,rs,rs_s,rs_s1
startime=timer() >>>More
Specify the cursor parameter when rs is turned on.
sql,conn,1,1 >>>More