<?php
error_reporting(0);
$msg=$_REQUEST['msg'];
include("connection.php");
?>
<html>
<head>
<link href="css/bootstrap-theme.min.css" rel="stylesheet" />
<link href="css/bootstrap.min.css" rel="stylesheet" />
<link href="css/font-awesome.min.css" rel="stylesheet" />
<link href="css/hover-min.css" rel="stylesheet" />
<link href="css/imagehover.css" rel="stylesheet"/>
<link href="css/style.css" rel="stylesheet"/>
<script src="js/jquery-2.1.0.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/mislider.min.js"></script>
<link href="css/mislider-cameo.css" rel="stylesheet" />
<style>
</style>
<!--Code for slider-->
<!-- Start WOWSlider.com HEAD section -->
<link rel="stylesheet" type="text/css" href="engine1/style.css" />
<script type="text/javascript" src="engine1/jquery.js"></script>
<!-- End WOWSlider.com HEAD section -->
</head>
<body style="overflow-x:hidden;">
<!--Starting of Container###########-->
<div class="container-fluid">
<div class="row">
<!--Starting of top menu-->
<?php include("head.php");?>
<!--Registration section start-->
<!--Starting of registration div-->
<div class="col-sm-12" style="background-color:#5acaf2; min-height:472px;">
<div class="col-sm-5">
<div class="col-sm-12 regtxt">
               Register Here...<span class="glyphicon glyphicon-pencil"></span>
</div>
<div class="col-sm-12">
<img src="images/doctor.png" height="400px;" width="95%">
</div>
</div>
<div class="col-sm-7" style="min-height:400px; "><!--Main Registration-->
<div class="col-sm-12">
<div class="col-sm-2"></div>
<div class="col-sm-8">
<!--Error Block Msg-->
<div class="col-sm-12 errmsg">
<?php
if($msg==1)
{
echo "Your Password and confirm password does not matched.";
}
?>
</div>
<form action="regcode.php" method="post" name="myform">
<br/><span class="txt">Title</span><br/> <!--##########First Part Registration############-->
<div class="input-group">
<span class="input-group-addon"><span class="fa fa-user" style="font-size: 12px"></span></span>
<select name="title" class="form-control">
<option>--Select--</option>
<option>Dr.</option>
<option>Mr.</option>
<option>Mrs.</option>
<option>Ms.</option>
</select>
</div>
<span class="txt">Name</span><br/>
<div class="input-group">
<span class="input-group-addon"><span class="fa fa-user" style="font-size: 12px"></span></span>
<input type="text" name="name" class="form-control" placeholder="Enter Your Name" required />
</div>
<span class="txt">Gender</span><br/>
<div class="input-group">
<span class="input-group-addon"><span class="fa fa-user" style="font-size: 12px"></span></span>
<div class="col-sm-12 form-control">
<input type="radio" name="a" value="Male"/><span class="radiobtn">Male</span>
<input type="radio" name="a" value="Female"/><span class="radiobtn">Female<span>
<input type="radio" name="a" value="Others"/><span class="radiobtn">Others<span>
</div></div>
<span class="txt">Contact No.</span><br/>
<div class="input-group">
<span class="input-group-addon"><span class="fa fa-user" style="font-size: 12px"></span></span>
<input type="number" name="number" class="form-control" placeholder="Enter Your Number" required/>
</div>
<span class="txt">Email Id</span><br/>
<div class="input-group">
<span class="input-group-addon"><span class="fa fa-user" style="font-size: 12px"></span></span>
<input type="email" name="email" class="form-control" placeholder="Enter Your Email Id" required/>
</div>
<span class="txt">Password</span><br/>
<div class="input-group">
<span class="input-group-addon"><span class="fa fa-user" style="font-size: 12px"></span></span>
<input type="password" name="pass" class="form-control" placeholder="Enter Your Password" required/>
</div>
<span class="txt"> Confirm Password</span><br/>
<div class="input-group">
<span class="input-group-addon"><span class="fa fa-user" style="font-size: 12px"></span></span>
<input type="password" name="cpass" class="form-control" placeholder="Re-Enter Password" required/>
</div>
<span class="txt"> City</span><br/>
<div class="input-group">
<span class="input-group-addon"><span class="fa fa-user" style="font-size: 12px"></span></span>
<input type="text" name="city" class="form-control" placeholder="Enter Your City" required/>
</div>
<span class="txt">Address</span><br/>
<div class="input-group">
<span class="input-group-addon"><span class="fa fa-user" style="font-size: 12px"></span></span>
<textarea class="form-control" name="address" placeholder="Enter Your Address" style="resize:none;" required></textarea>
</div>
<div class="col-sm-12" style="min-height:60px;margin-bottom:2%;">
<div class="col-sm-12">
<input type="checkbox" name="check" required/>  <span class="declaration">I agree to the term and Conditions.</span>
</div>
<div class="col-sm-6"><input type="submit" value="Register" class="form-control btnsub" id="btnreg"/></div>
<div class="col-sm-6"><input type="reset" value="Reset" class="form-control btnsub" id="btnreset"/></div>
</div>
</div> <!--###########################-->
</form>
</div>
<div class="col-sm-2"></div>
</div>
</div> <!--Closing main registration-->
<!--Registration section ends-->
<!--Footer section-->
<div class="col-sm-12 footer">
<div class="row">
<!--==========================
Footer
============================-->
<footer id="footer">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="copyright">
© Copyright <strong>Kanchan Web Services 2017</strong>. All Rights Reserved
</div>
<div class="credits">
Developed by <a href="https://kanchanwebs.com/">Kanchan Webs Services</a>
</div>
<!-- starting for regcode.php -->
<?php
$title=$_POST['title'];
$name=$_POST['name'];
$gender=$_POST['a'];
$number=$_POST['number'];
$email=$_POST['email'];
$password=$_POST['pass'];
$cpass=$_POST['cpass'];
$city=$_POST['city'];
$address=$_POST['address'];
if($password==$cpass)
{
include("connection.php");
$query="insert into tbl_registration (title,name,gender,number,email,password,city,address,reg_date) values('$title','$name','$gender','$number','$email','$password','$city','$address',now())";
$smsurl="http://198.24.149.4/API/pushsms.aspx?loginID=user0484&password=Pass@123&mobile=$number&text=HELLO $name Thank you For your Registration With Ahommed Pvt. Ltd. Ghar Ghar Ki Pharmacy&senderid=DhOmEd&route_id=2&Unicode=0";
$responseBody = file_get_contents($smsurl);
mysql_query($query);
header("location:index.php?msg=2");
}
else
{
header("location:registration.php?msg=1");
}
?>
?>
</div>
</div>
</div>
</footer><!-- #footer -->
</div>
</div>
<!--Footer section ends-->
</div>
</div>
<!--####closing of container########-->
</body>
<?php include("modal.php");?>
</html>
<?php
$title=$_POST['title'];
$name=$_POST['name'];
$gender=$_POST['a'];
if($gender=='male')
{
echo "male";
}
else if($gender=='female')
{
echo "female";
}
else
{
echo "Registration Done!"
}
$number=$_POST['number'];
$email=$_POST['email'];
$password=$_POST['pass'];
$cpass=$_POST['cpass'];
$city=$_POST['city'];
$address=$_POST['address'];
if($password==$cpass)
{
include("connection.php");
$query="insert into tbl_registration (title,name,gender,number,email,password,city,address,reg_date) values('$title','$name','$gender','$number','$email','$password','$city','$address',now())";
$responseBody = file_get_contents('http://198.24.149.4/API/pushsms.aspx?loginID=user0484&password=Pass@123&mobile=$number&text=HELLO $name Thank you For your Registration With Ahommed Pvt. Ltd. Ghar Ghar Ki Pharmacy&senderid=DhOmEd&route_id=2&Unicode=0');
mysql_query($query);
header("location:index.php");
}
else
{
header("location:registration.php?msg=1");
}
?>