Help me in form validation

Reply

Join Date: Oct 2009
Posts: 8
Reputation: chowdarysmk is an unknown quantity at this point 
Solved Threads: 0
chowdarysmk chowdarysmk is offline Offline
Newbie Poster

Help me in form validation

 
-1
  #1
Oct 21st, 2009
Hai 2 all
I have a small correction at password:
now invalid charcters also taken in form plz modify prog
if u enter ivalid charcters like~!@#
tis type it show an error msg invali charcters display it one plz
HTML CODE
  1. <html>
  2. <head>
  3. <title>Registration</title>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  5. <script type="text/javascript" src="js/jquery.js"></script>
  6. <script type="text/javascript" src="js/jquery.metadata.js"></script>
  7. <script type="text/javascript" src="js/jquery.validate.js"></script>
  8. <script type="text/javascript" src="js/validate.js"></script>
  9. <form action="keystone_Register.php" method="post" name="regForm" id="regForm" >
  10.  
  11.  
  12. <table width="778" border="0" align="center" cellpadding="0" cellspacing="1" >
  13. <tr>
  14. <td height="25" colspan="2"><span class="black"><font color="#FF0000">(*Mandatory Fields) </font></span></td>
  15. </tr>
  16.  
  17. <tr>
  18. <td height="30" colspan="2" class="tableheader11r">Personal Information </td>
  19. </tr>
  20. <tr>
  21. <td height="30" class="required">First Name:<span class="black"><font color="#FF0000">*
  22. </font></span></td>
  23. <td height="30" class="required"><input name="f_name" type="text" id="f_name" value=""class="txtBox" ><br><div class="redtxt" id="fname"></div></td>
  24. <td class="required">Middle Name:<alt="not mentioned" span class="black"><font color="#FF0000"><alt="">
  25. </font></span></td>
  26. <td height="" class="required"><input name="m_name" type="text" id="m_name" value=""class="txtBox" ><br><div class="redtxt" id="mname"></div></td>
  27. </tr>
  28.  
  29. </tr>
  30.  
  31. <tr>
  32. <td height="30" class="required">Last Name:<span class="black"><font color="#FF0000">*
  33. </font></span></td>
  34. <td height="30" class="required"><input name="l_name" type="text" id="l_name" value="" class="txtBox"><br><div class="redtxt" id="lname"></div></td>
  35. </tr>
  36.  
  37. <tr>
  38. <td>Email Id<span class="required"><font color="#CC0000">*</font></span>
  39. </td>
  40. <td><input name="usr_email" type="text" id="usr_email3" class="required email">
  41. <span class="example">(eg:abc@xyz.com)</span></td>
  42. </tr> <tr>
  43. <td>Password<span class="required"><font color="#CC0000">*</font></span>
  44. </td>
  45. <td><input name="pwd" type="password" class="required password" minlength="8" id="pwd">
  46. <span class="example"><br>(Minimum 8 characters)</span></td>
  47. </tr>
  48. <tr>
  49. <td>Retype Password<span class="required"><font color="#CC0000">*</font></span>
  50. </td>
  51. <td><input name="pwd2" id="pwd2" class="required password" type="password" minlength="8" equalto="#pwd"></td>
  52. </tr>
  53. <tr>
  54. <td colspan="2">&nbsp;</td>
  55. </tr>
  56. <tr>
  57. <td height="30" class="required">Area of Interest:<span class="black"><font color="#FF0000">
  58. </font></span></td>
  59. <td height="30" class="required"> <select name="areaofinterest">
  60. <?php
  61. if ($myrow["areaofinterest"]=="ePublishing")
  62. {
  63. ?>
  64. <option value="ePublishing" selected>ePublishing</option>
  65. <option value="Retail">Retail</option>
  66. <option value="Other">Other</option>
  67.  
  68. <?php
  69. }
  70. ?>
  71.  
  72. <?php
  73. if ($myrow["areaofinterest"]=="Retail")
  74. {
  75. ?>
  76. <option value="ePublishing">ePublishing</option>
  77. <option value="Retail" selected>Retail</option>
  78. <option value="Other" >Other</option>
  79.  
  80.  
  81. <?php
  82. }
  83. ?>
  84.  
  85. <?php
  86. if ($myrow["areaofinterest"]=="Other")
  87. {
  88. ?>
  89. <option value="ePublishing">ePublishing</option>
  90. <option value="Retail">Retail</option>
  91. <option value="Other" selected >Other</option>
  92.  
  93. <?php
  94. }
  95. ?>
  96.  
  97. <?php
  98. if ($myrow["areaofinterest"]=="")
  99. {
  100. ?>
  101. <option value="" selected >Select</option>
  102. <option value="ePublishing">ePublishing</option>
  103. <option value="Retail">Retail</option>
  104. <option value="Other" >Other</option>
  105.  
  106. <?php
  107. }
  108. ?>
  109. </select><br><div class="redtxt" id="interest"></div> </td>
  110. </tr>
  111.  
  112. <tr>
  113. <td height="30" class="required">Comments:<span class="black"></span></td>
  114. <td height="30" class="required"><textarea name="comments" id="comments" class="txtBox"></textarea><div class="redtxt" id="res"></div></td>
  115. </tr>
  116.  
  117. </tr>
  118. <tr>
  119. <td>
  120. <p>
  121. <input name="send" type="checkbox" id="send" value="1" checked>Recive email/promotional news or other imporatant news
  122. </p></td></tr>
  123. <tr align="center">
  124. <td height="40">&nbsp;</td>
  125. <td height="40" align="left"><input type="submit" name="Submit" value="Register" class="txtBox"></td>
  126. </tr>
  127. </table>
  128. </form>
Last edited by peter_budo; Oct 22nd, 2009 at 2:43 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks)
Attached Files
File Type: zip js1.zip (19.4 KB, 0 views)
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 443
Reputation: Atli is on a distinguished road 
Solved Threads: 56
Atli's Avatar
Atli Atli is offline Offline
Posting Pro in Training
 
1
  #2
Oct 21st, 2009
Hey.

First of all, you need to Validate Your HTML. It is all mest up. You don't even have a body tag, and a bunch or random attributes that mean nothing.

Please fix this first, then post your code back. (Within [code] tags, please)

Also, from what I understand of your question, you are asking for help modifying password validation? (Correct me if I am wrong please.)
None of that code is on this page. It seems to be both in those JavaScript files you include, and/or in the PHP file your <form> targets. Please post that code as well if you want us to help you with it.

If I am completely misunderstanding you, please elaborate.
Please do not ask for help in a PM. Use the forums.
And use [code] tags!
Reply With Quote Quick reply to this message  
Reply

Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC