User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP section within the Web Development category of DaniWeb, a massive community of 392,300 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,838 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP advertiser: Lunarpages ASP Web Hosting
Views: 3115 | Replies: 2
Join Date: Jul 2004
Posts: 16
Reputation: shantuli is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 0
shantuli shantuli is offline Offline
Newbie Poster

Help problem in javascript coding in asp page

  #1  
Jun 25th, 2005
can anyone pls fix up the problem

Regvalidate.asp page coding :


<%

MyFirstName = Request.Form ("login1")
MyLastName = Request.Form ("login2")
MyUserName = Request.Form ("login")
MyEmail = Request.Form ("email")
MyPassword = Request.Form ("password1")
MyGerder = Request.Form ("gender")
MyDateofBirth = Request.Form ("login3")
MyAge = Request.Form ("login4")
MyCountryofResidence = Request.Form ("countryofresidence")
MyMaritalstatus = Request.Form ("maritalstatus")
MyHavechildren = Request.Form ("havechildren")
MyHeight = Request.Form ("height")
MyBodytype = Request.Form ("bodytype")
MyComplexion = Request.Form ("complexion")
MySpecialcases = Request.Form ("specialcases")
MyReligion = Request.Form ("religion")
MyCaste = Request.Form ("caste")
MySubcaste = Request.Form ("subcaste")
MyMothertongue = Request.Form ("mothertongue")
MyAreuaManglik = Request.Form ("manglik")
MyFamilyvalues = Request.Form ("familyvalues")
MyEducation = Request.Form ("educationlevel")
MyOccupation = Request.Form ("occupation")
MyAnnualincome = Request.Form ("annualincome")
MyDiet = Request.Form ("diet")
MySmoke = Request.Form ("smoke")
MyDrink = Request.Form ("drink")
MyAboutYourself = Request.Form ("counter1")
MyAboutFamily = Request.Form ("counter2")



set Conn = Server.CreateObject ("ADODB.Connection")
Conn.Open ("Provider = Microsoft.Jet.OLEDB.4.0; Data Source = c:\project.mdb")
'Response.Write (myusername)

'strsq="select * from Registration where UserName='myusername'"
'set r=conn.Execute (strsq,,adcmdtext)

'conn.Execute strsq
'response.write strsq
'Response.End

'if then 'not r.eof then
strsql = "insert into Registration values ('" & MyFirstName & "','" & MyLastName & "'," & MyUserName & ",'" & MyEmail & "','" & MyPassword & "','" & MyGender & "','" & MyDateofBirth & "','" & MyAge & "','" & MyCountryofResidence & "','" & MyMaritalStatus & "','" & MyHavechildren & "','" & MyHeight & "','" & MyBodytype & "','" & MyComplexion & "','" & MySpecialcases & "','" & MyReligion & "','" & MyCaste & "','" & MySubcaste & "','" & MyMothertongue & "','" & MyAreuaManglik & "','" & MyFamilyvalues & "','" & MyEducation & "','" & MyOccupation & "','" & MyAnnualincome & "','" & MyDiet & "','" & MySmoke & "','" & MyDrink & "','" & MyAboutYourself & "','" & MyAboutFamily & "',)"

response.write strsql
conn.Execute strsql
'Response.End
Response.Redirect ("successfulReg..htm")


'else
'just give a msg that user already exist and1 try again with1 other user then redirect back to Register.htm page
'Response.Redirect ("Errorpage.htm")

'end if



%>





Validate.asp page coding :


<%
UN = Request.form("login")
pwd = Request.form("password1")
response.write(UN &" "& PWD)

set Conn = Server.CreateObject ("ADODB.Connection")
Set Recset = Server.CreateObject ("ADODB.Recordset")

Conn.Open ("Provider = Microsoft.Jet.OLEDB.4.0; Data Source = f:\project.mdb")
recset.ActiveConnection = conn
strSQL = "Select * from Registration where UserName = '"& UN &"' and Password = '"& pwd &"'"
Response.write"<br>" & strSQL
'Response.End
Recset.Open strsql

do until recset.EOF
if ((recset.Fields(2) = un) and (recset.Fields(4) = pwd)) then
flg = 1
session("myUserName")=recset.Fields(0)

end if
Response.Write recset.Fields(1)
recset.MoveNext



Loop
if (flg = 1) then
Response.Write ("Valid Login")
Response.Redirect("welcome_member.asp")
else

Response.Redirect("Errorpage.htm")
end if

%>






Register.htm page code is:


<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
<style type="text/css">

.style1 {font-family: Arial, Helvetica, sans-serif}
body, td, th {
font-family: Arial, Helvetica, sans-serif;
}
.style10 {font-family: Arial, Helvetica, sans-serif; font-size: 12px; }
.style8 { font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
font-size: 12px;
}
a:link {
text-decoration: none;
color: #000000;
}
a:visited {
text-decoration: none;
color: #000000;
}
a:hover {
text-decoration: none;
color: #000000;
}
a:active {
text-decoration: none;
}
</style>

<meta name="Microsoft Theme" content="axis 011">
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><font face="trebuchet ms, Arial, Helvetica" mstheme>
<p align="center"><b><a href="index.htm"><u><font face="Monotype Corsiva" size="6" color="#616161">Online
Islamic Marriage Service</font></u></a></b></p>
<p align="center"><img alt="Matrimonial Service" src="models_pic10.gif" width="473" height="114"><img alt="Matrimonial Service" src="models_pic21234567890.gif" width="89" height="114"></p>


<script language="Javascript" src="unsaved:///ssi/matrimonials.js"></script>


<!-- The top link table start's here -->
<center>


<!-- The top link table starts here -->
<!-- The top link table ends here -->




<!-- The topbanner table start's here -->

</center>








<!-- The bottom link table start's here -->

<!-- The bottom link table end's here -->

</font mstheme><table cellSpacing="1" cellPadding="1" width="100%" align="center" border="0" height="25">
<tr>
<th scope="col" height="21" width="2" align="center"><font face="trebuchet ms, Arial, Helvetica" mstheme>
<div align="center">
</div>
</font mstheme></th>
<th scope="col" width="152" background="gelbarlonghp.gif" bgColor="#ffffff" height="21" align="center"><font face="trebuchet ms, Arial, Helvetica" mstheme><span class="style15"><a href="index.htm"><b><font color="#FFFFFF">Home</font></b></a></span></font mstheme></th>
<th scope="col" width="178" background="gelbarlonghp.gif" bgColor="#ffffff" height="21" align="center"><font face="trebuchet ms, Arial, Helvetica" mstheme><span class="style15"><a href="Login.htm"><b><font color="#FFFFFF">Login</font></b></a></span></font mstheme></th>
<th scope="col" width="158" background="gelbarlonghp.gif" bgColor="#ffffff" height="21" align="center"><font face="trebuchet ms, Arial, Helvetica" mstheme><span class="style15"><a href="Register.htm"><font color="#FFFFFF">Register</font></a></span></font mstheme></th>
<th scope="col" width="178" background="gelbarlonghp.gif" bgColor="#ffffff" height="21" align="center"><font face="trebuchet ms, Arial, Helvetica" mstheme><span class="style15"><a href="websearch.asp"><font color="#FFFFFF">Search</font></a></span></font mstheme></th>
<th scope="col" width="132" background="gelbarlonghp.gif" bgColor="#ffffff" height="21" align="center"><font face="trebuchet ms, Arial, Helvetica" mstheme><span class="style15"><a href="Login.htm"><font color="#FFFFFF">Members</font></a></span></font mstheme></th>
</tr>
<tr>
<th scope="col" height="21" width="2" align="center"><font face="trebuchet ms, Arial, Helvetica" mstheme>
<div align="center">
</div>
</font mstheme></th>
<th scope="col" width="152" background="gelbarlonghp.gif" bgColor="#ffffff" height="21" align="center"><font face="trebuchet ms, Arial, Helvetica" mstheme><span class="style15"><a href="ContactUs.htm"><font color="#FFFFFF">Contact
Us</font></a></span></font mstheme></th>
<th scope="col" width="178" background="gelbarlonghp.gif" bgColor="#ffffff" height="21" align="center"><font face="trebuchet ms, Arial, Helvetica" mstheme><span class="style15"><a href="AboutUs.htm"><font color="#FFFFFF">About
Us</font></a></span></font mstheme></th>
<th scope="col" width="158" background="gelbarlonghp.gif" bgColor="#ffffff" height="21" align="center"><font face="trebuchet ms, Arial, Helvetica" mstheme><span class="style15"><a href="privacypolicy.htm"><font color="#FFFFFF">Privacy
Policy</font></a></span></font mstheme></th>
<th scope="col" width="178" background="gelbarlonghp.gif" bgColor="#ffffff" height="21" align="center"><font face="trebuchet ms, Arial, Helvetica" mstheme><span class="style15"><a href="terms&amp;condition.htm"><font color="#FFFFFF">Terms
&amp; Condition</font></a></span></font mstheme></th>
<th scope="col" width="132" background="gelbarlonghp.gif" bgColor="#ffffff" height="21" align="center"><font face="trebuchet ms, Arial, Helvetica" mstheme><span class="style15"><a href="help.htm"><font color="#FFFFFF">Help</font></a></span></font mstheme></th>
</tr>
</table><font face="trebuchet ms, Arial, Helvetica" mstheme>
<p align="center">&nbsp;</p>


<script language="Javascript" src="unsaved:///ssi/matrimonials.js"></script>


<!-- The top link table start's here -->
<center>


<!-- The top link table starts here -->
<!-- The top link table ends here -->




<!-- The topbanner table start's here -->
<div style="width: 762px; background-color: #ffffff;">
<div style="border-top: 1px solid #8FA7BF; border-left: 1px solid #8FA7BF; border-right: 1px solid #8FA7BF;">


</div>
</div>
</font mstheme><table width="1034" cellpadding="0" cellspacing="0" border="0" bgcolor="#ffffff" height="340">
<tr>
<td valign="top" width="717" height="584"><font face="trebuchet ms, Arial, Helvetica" mstheme>
<!-- error ends -->



</font mstheme><table width="720" align="center" cellpadding="0" cellspacing="10" border="0" height="620">
<form method="post" action="registration2.php" name="form1" autocomplete="off">
<tr><td colspan="3" class="smallblack" height="46"><font face="trebuchet ms, Arial, Helvetica" mstheme><font class="smallblackbold"><b><u>Note:</u></b></font><br>
&nbsp; - <font class="smallred">Fields marked with [ * ] are compulsory.</font><br>
&nbsp; - Please enter accurate information in this form or your profile may be declined.<br>
&nbsp; - All information you submit here, including Special Cases, will be visible on your profile.</font mstheme></td></tr>
<tr><td colspan="3" bgcolor="#8FA7BF" height="24"><font face="trebuchet ms, Arial, Helvetica" mstheme><spacer type="block" height="1"></font mstheme></td></tr>

<tr>
<td width="135" class="mediumblack" height="79">First Name<p>Last Name</td>
<td width="235" class="formselect" height="79"><font face="trebuchet ms, Arial, Helvetica" mstheme>
<input type="text" name="login1" maxlength="20" value class="forminput" size="20"></font mstheme><p><font face="trebuchet ms, Arial, Helvetica" mstheme>
<input type="text" name="login2" maxlength="20" value class="forminput" size="20"></font mstheme></td>
<td width="350" class="smallblack" rowspan="2" height="134"><font face="trebuchet ms, Arial, Helvetica" mstheme><font color="#800000"><font class="smallred">Profile ID must have minimum 4 characters &amp; no special characters. It cannot be changed later.</font> <br>
You will be known on the site by this name, e.g. a Profile with ID 'Anand' will be seen as Anand's profile.</font></font mstheme></td>
</tr>

<tr>
<td class="mediumblack" height="45">User Name</td>
<td class="forminput" height="45"><font face="trebuchet ms, Arial, Helvetica" mstheme>
<input type="text" name="login" maxlength="20" value class="forminput" size="20"></font mstheme></td>
</tr>

<tr><td colspan="3" bgcolor="#E5E5E5" height="24"><font face="trebuchet ms, Arial, Helvetica" mstheme><spacer type="block" height="1"></font mstheme></td></tr>

<tr>
<td class="mediumblack" height="29"><font face="trebuchet ms, Arial, Helvetica" mstheme>Email</font mstheme></td>
<td class="forminput" height="29"><font face="trebuchet ms, Arial, Helvetica" mstheme><input type="text" name="email" value class="forminput" size="30"></font mstheme></td>
<td class="smallblack" rowspan="2" height="68"><font face="trebuchet ms, Arial, Helvetica" mstheme><font color="#800000">Please enter your email correctly. You will be logging in using this email. We will send you member responses here.</font></font mstheme></td>
</tr>

<tr>
<td class="mediumblack" height="29">&nbsp;</td>
<td class="forminput" height="29">&nbsp;</td>
</tr>

<tr><td colspan="3" bgcolor="#E5E5E5" height="24"><font face="trebuchet ms, Arial, Helvetica" mstheme><spacer type="block" height="1"></font mstheme></td></tr>

<tr>
<td class="mediumblack" height="25"><font face="trebuchet ms, Arial, Helvetica" mstheme>Password</font mstheme></td>
<td class="forminput" height="25"><font face="trebuchet ms, Arial, Helvetica" mstheme>
<input type="password" name="password1" value class="forminput" size="20"></font mstheme></td>
<td class="smallblack" rowspan="2" height="81"><font face="trebuchet ms, Arial, Helvetica" mstheme><font color="#800000">Minimum 4 characters; no special characters</font></font mstheme></td>
</tr>

<tr>
<td class="mediumblack" height="46">&nbsp;</td>
<td class="forminput" height="46">&nbsp;</td>
</tr>

<tr><td colspan="3" bgcolor="#E5E5E5" height="24"><font face="trebuchet ms, Arial, Helvetica" mstheme><spacer type="block" height="1"></font mstheme></td></tr>

<tr>
<td class="mediumblack" height="24"><font face="trebuchet ms, Arial, Helvetica" mstheme>Gender</font mstheme></td>
<td class="mediumblack" height="24"><font face="trebuchet ms, Arial, Helvetica" mstheme><input type="radio" name="gender" value="Male">Male <input type="radio" name="gender" value="Female">Female</font mstheme></td>
<td class="smallred" rowspan="3" height="86"><font face="trebuchet ms, Arial, Helvetica" mstheme><font color="#800000">Your date of birth will be visible only to you.<br>Others can only see your age and sun-sign.</font><br><br><br><br></font mstheme></td>
</tr>

<tr>
<td class="mediumblack" height="26"><font face="trebuchet ms, Arial, Helvetica" mstheme>Date of Birth</font mstheme><p>&nbsp;</p>
<p>Age</td>
<td class="formselect" height="26"><font face="trebuchet ms, Arial, Helvetica" mstheme>
<input type="text" name="login3" maxlength="20" value class="forminput" size="20">
(dd/mm/yyyy)&nbsp; </font mstheme>
<p><font face="trebuchet ms, Arial, Helvetica" mstheme>
<input type="text" name="login4" maxlength="20" value class="forminput" size="20"></font mstheme></td>
</tr>

<tr>
<td class="mediumblack" height="1"><font face="trebuchet ms, Arial, Helvetica" mstheme>Country of Residence</font mstheme></td>
<td class="formselect" height="1"><font face="trebuchet ms, Arial, Helvetica" mstheme><select name="countryofresidence" class="formselect">
<option SELECTED VALUE>Select</option><option>India</option>
<option>USA</option>
<option>United Kingdom</option>
<option>United Arab Emirates</option>
<option>Canada</option>
<option>Australia</option>
<option>Pakistan</option>
<option></option>
<option>Afghanistan</option>
<option>Albania</option>
<option>Algeria</option>
<option>American Samoa</option>
<option>Andorra</option>
<option>Angola</option>
<option>Anguilla</option>
<option>Antigua &amp; Barbuda</option>
<option>Argentina</option>
<option>Armenia</option>
<option>Australia</option>
<option>Austria</option>
<option>Azerbaijan</option>
<option>Bahamas</option>
<option>Bahrain</option>
<option>Bangladesh</option>
<option>Barbados</option>
<option>Belarus</option>
<option>Belgium</option>
<option>Belize</option>
<option>Bermuda</option>
<option>Bhutan</option>
<option>Bolivia</option>
<option>Bosnia and Herzegovina</option>
<option>Botswana</option>
<option>Brazil</option>
<option>Brunei</option>
<option>Bulgaria</option>
<option>Burkina Faso</option>
<option>Burundi</option>
<option>Cambodia</option>
<option>Cameroon</option>
<option>Canada</option>
<option>Cape Verde</option>
<option>Cayman Islands</option>
<option>Central African Republic</option>
<option>Chad</option>
<option>Chile</option>
<option>China</option>
<option>Colombia</option>
<option>Comoros</option>
<option>Congo</option>
<option>Congo (DRC)</option>
<option>Cook Islands</option>
<option>Costa Rica</option>
<option>Cote d'Ivoire</option>
<option>Croatia (Hrvatska)</option>
<option>Cuba</option>
<option>Cyprus</option>
<option>Czech Republic</option>
<option>Denmark</option>
<option>Djibouti</option>
<option>Dominica</option>
<option>Dominican Republic</option>
<option>East Timor</option>
<option>Ecuador</option>
<option>Egypt</option>
<option>El Salvador</option>
<option>Equatorial Guinea</option>
<option>Eritrea</option>
<option>Estonia</option>
<option>Ethiopia</option>
<option>Falkland Islands</option>
<option>Faroe Islands</option>
<option>Fiji Islands</option>
<option>Finland</option>
<option>France</option>
<option>French Guiana</option>
<option>French Polynesia</option>
<option>Gabon</option>
<option>Gambia</option>
<option>Georgia</option>
<option>Germany</option>
<option>Ghana</option>
<option>Gibraltar</option>
<option>Greece</option>
<option>Greenland</option>
<option>Grenada</option>
<option>Guadeloupe</option>
<option>Guam</opt