السلام عليكم ورحمة الله وبركاته
عندي كود لارسال بيانات الى قاعدة البيانات
ولكن للاسف فان المعلومات لاتصل الى قاعدة البيانات و لا اعلم ما السبب فلو يتكرم احد الاخوة بتجربة الكود على جهازه
واعطائنا النتيجة
كود صفحة النموذج لكتابة البيانات (form ):
<%@ LANGUAGE="VBSCRIPT" %>
Register
Fill in this form to become a member of Primary Outpost.
Desired Username:
Password:
Password (again):
First Name:
Last Name:
Email Address:
اما الكود الثاني لتحقق من صحة البيانات_ تاكيد على كلمة السر _ قبل وضعها في قاعدة البيانات
و اسم الصفحة take_registration.asp
<%@ LANGUAGE="VBSCRIPT" %>
<%
On Error Resume Next
p_userid =request.querystring("p_name")
p_pass1 =request.querystring("p_pass1")
p_pass2 =request.querystring("p_pass2")
p_first =request.querystring("p_first")
p_last =request.querystring("p_last")
p_email = request.querystring("p_email")
if p_pass1 = p_pass2 then
set outpostDB = server.createObject("ADODB.Connection")
outpostDB.open "DNS=outpost"
theSQL = "INSERT INTO members (username, password, first_name, last_name, email)"
theSQL = theSQL & " VALUES ( '"&p_userid&"', '"&p_pass1&"', '"
theSQL = theSQL & p_first&"', '"&p_last&"', '"&p_email&"')"
outpostDB.Execute(theSQL)
outpostDB.close
set outpostDB = Nothing
%>
<% if Err.number = 0 then
'All is well with the world %>
User Registration
Thank you for registering with Primary Outpost!
<% else %>
There was a problem with their registration
Problem
There was a problem with your registration.
Please go back and choose a different username.
<% end if
else
'p_pass1 doesn't match p_pass2
%>
Password Error
Both entries for your password must match.
Please try again. Thank you!
<%
end if
%>
