Click here to Skip to main content
15,902,198 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
XML
<?php
include "db.php";
include "header.php";
include "banner.php";
include "left_area.php";

session_start();

?>
<!-- my code datepicker code generated here mallesh -->

<link rel="stylesheet" href="images/images/main.css">
                    <script type="text/javascript" language="javascript" src="images/images/prototype-1.js"></script>
            <script type="text/javascript" language="javascript" src="images/images/prototype-base-extensions.js"></script>
            <script type="text/javascript" language="javascript" src="images/images/prototype-date-extensions.js"></script>
            <script type="text/javascript" language="javascript" src="images/images/behaviour.js"></script>
                            <script type="text/javascript" language="javascript" src="images/images/datepicker.js"></script>
                                        <link rel="stylesheet" href="images/images/datepicker.css">
                            <script type="text/javascript" language="javascript" src="images/images/behaviors.js"></script>

<!--   End ......................... here -->

<!--<script language="javascript" type="text/javascript" src="datetimepicker.js">

//Date Time Picker script- by TengYong Ng of http://www.rainforestnet.com
//Script featured on JavaScript Kit (http://www.javascriptkit.com)
For this script, visit http://www.javascriptkit.com -->

</script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
    window.$required = $('<div></div>').dialog({
        autoOpen: false,
        title: 'Required Information'
    });
});

</script>

<script type="text/javascript">
$(document).ready(function(){
$("#register").submit(function(){


email=$("#email").val();
pwd=$("#pwd").val();
rpwd=$("#rpwd").val();
name=$("#name").val();
//alert(name);
birth=$("#birth").val();
alert(birth);
country=$("#country").val();
address=$("#address").val();
lcaddress=$("#lcaddress").val();
state=$("#state").val();
city=$("#city").val();
about=$("#about").val();
phone=$("#phone").val();
//alert(phone);
letterscode=$("#letterscode").val();
checkbox=$("#checkbox").val();

var emailReg = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;
if($("#email").val() == "") {
$required.html("User name field is required.").dialog('open');
$("#email").focus()
return false;
}
if(!emailReg.test($("#email").val())) {
$required.html("Invalid mail address.Mail id should have (ex:sss@gmail.com)").dialog('open');
return false
}

if($("#pwd").val() == "") {
$required.html("password field is required.").dialog('open');
$("#pwd").focus()
return false;
}
if($("#rpwd").val() == "") {
$required.html("Re-type password field is required.").dialog('open');
$("#rpwd").focus()
return false;
}
if($("#pwd").val() != $("#rpwd").val())
{
$required.html("Re-type password not matched.").dialog('open');
$("#rpwd").focus()
return false;
}

if($("#name").val() == "") {
$required.html("Name field is required.").dialog('open');
$("#name").focus()
return false;
}


if($("#birth").val() == "") {
$required.html("Date of birth field is required.").dialog('open');
$("#birth").focus()
return false;
}
if($("#country").val() == "") {
$required.html("country field is required.").dialog('open');
$("#country").focus()
return false;
}

if($("#address").val() == "") {
$required.html("address field is required.").dialog('open');
$("#address").focus()
return false;
}

if($("#lcaddress").val() == "") {
$required.html("Local contact address field is required.").dialog('open');
$("#lcaddress").focus()
return false;
}

if($("#state").val() == "") {
$required.html("State field is required").dialog('open');
$("#state").focus()
return false;
}

if($("#city").val() == "") {
$required.html("City field is required...").dialog('open');
$("#city").focus()
return false;
}

if($("#phone").val() == "") {
$required.html("Phone field is required..").dialog('open');
$("#phone").focus()
return false;
}
filter = /^[0-9-+]+$/;
    if (!(filter.test($("#phone").val())))
    {
     $required.html("please enter numbers only .").dialog('open');
     $("#phone").focus()
     return false;
     }


if($("#about").val() == "") {
$required.html("about field is required..").dialog('open');
$("#about").focus()
return false;
}

if($("#letterscode").val() == "") {
$required.html("captcha (6 letters code) feild is required.").dialog('open');
$("#letterscode").focus()
return false;
}



if (!($("#checkbox").is(":checked"))) {
$required.html("checked field is required..").dialog('open');
return false;
}



$.ajax({
type: "POST",
url: "register_get.php",
data: {

email: email,
pwd: pwd,
name: name,
birth: birth,
country: country,
address: address,
lcaddress: lcaddress,
state: state,
city: city,
phone: phone,
about: about,
letterscode: letterscode


},
success: function(msg){

if(msg == 1) {
//alert(msg);
 location="registerd.php";



}

else if(msg == 0) {
//alert(msg);
$required.html("captcha code doesn't match .").dialog('open');

}

else  {
//alert(msg);
$required.html("registered email alredy existed .").dialog('open');

}
}
});
return false;
});

return true
});
</script>








<td align="left" valign="top" id="inner-txt-padding"><div  id="inner-title-bg1"><span id="title">Registration</span></div>
<div id="service-page-bg">
<!--Content Area-->
<form name="register" id="register" method="post"  >

<table width="100%" cellspacing="5">
<tr><td>Email Id *</td><td><input type="text" name="email" id="email" size="30" value='<?php echo htmlentities($email) ?>'></td></tr>
<tr><td>Password *</td><td><input type="password" name="pwd" id="pwd" size="30" value='<?php echo htmlentities($pwd) ?>'></td></tr>
<tr><td>Re-type Password *</td><td><input type="password" name="rpwd" id="rpwd" size="30" value='<?php echo htmlentities($rpwd) ?>'></td></tr>
<tr><td>Full Name *</td><td><input type="text" name="name" id="name" size="30" value='<?php echo htmlentities($name) ?>'></td></tr>
<tr><td>Date Of Birth *</td><td>
<input type="text"  maxlength="25" size="20" name="birth" id="birth" class="datepicker" value='<?php echo htmlentities($birth) ?>'>
</td></tr>
<tr><td>Country Of Residence *</td><td><input type="text" name="country" id="country" size="30" value='<?php echo htmlentities($country) ?>'></td></tr>
<tr><td>Address </td><td><textarea cols="25" rows="5" name="address" id="address" ><?php echo htmlentities($address) ?></textarea></td></tr>
<tr><td>Local Contact Address *</td><td><textarea cols="25" rows="5" name="lcaddress" id="lcaddress"><?php echo htmlentities($lcaddress) ?></textarea></td></tr>
<tr><td>State *</td><td><input type="text" name="state" id="state" size="30" value='<?php echo htmlentities($state) ?>'></td></tr>
<tr><td>City *</td><td><input type="text" name="city" id="city" size="30" value='<?php echo htmlentities($city) ?>'></td></tr>
<tr><td>Phone *</td><td><input type="text" name="phone" id="phone" size="30" value='<?php echo htmlentities($phone) ?>'></td></tr>
<tr><td>How did you hear about us? *</td><td><input type="text" name="about" id="about" size="30" value='<?php echo htmlentities($about) ?>'></td></tr>
<tr><td>Security Code *</td><td><input id="letterscode" name="6_letters_code" type="text"></td></tr>
<tr><td>&nbsp;</td><td><img src="captcha_code_file.php?rand=<?php echo rand(); ?>" id='captchaimg' name="captchaimg"></td></tr>
<tr><td>&nbsp;</td><td><input type="checkbox" id="checkbox" name="checkbox"> I accept the <a href="#">Terms & Conditions</a></td></tr>
<tr><td>&nbsp;</td><td><input type="submit" value="SUBMIT" name="submit">&nbsp;&nbsp;<input type="reset" value="RESET"></td></tr>
</table>

</form>







<!-- Close Content Area -->
</div>
<!--After Content add this -->
            </td>
          </tr>
        </table></td>
      </tr>



<?php
include "footer.php";
?>
Posted
Comments
OriginalGriff 2-Mar-13 6:40am    
That is a code dump, not a question.
Edit it, cut it down to the relevant parts only, and explain what your problem is, remembering we can't see your screen or read your mind.
Use the "Improve question" widget to edit your question and provide better information.
Sandeep Mewara 2-Mar-13 11:32am    
This is not a well framed question! We cannot work out what you are trying to do/ask from the post. Please elaborate and be specific.
Use the "Improve question" link to edit your question and provide better information.
RDBurmon 3-Mar-13 6:22am    
Why ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900