GOOGLE
<script src="js/jquery.min.js" type="text/javascript"></script>
<?php
include('dbcon.php');
if(isset($_POST['submit']))
{
extract($_POST);
$add = $plot. ",". $landmark. "," .$village. "," .$taluka. "," .$district. "," .$pinCode;
$select = mysql_query("SELECT * FROM `registration` WHERE `email_id`='".$email."'");
$selEmail = mysql_fetch_array($select);
if($selEmail['email_id']==$email){
$notMatch ='Email Id Alredy Exist Please Enter Another Email Id';
}else{
date_default_timezone_set('Asia/Kolkata');
define ("MAX_SIZE","400");
function getExtension($str) {
$i = strrpos($str,".");
if (!$i) { return ""; }
$l = strlen($str) - $i;
$ext = substr($str,$i+1,$l);
return $ext;
}
$errors=0;
if($_SERVER["REQUEST_METHOD"] == "POST")
{
$image =$_FILES["file"]["name"];
$uploadedfile = $_FILES['file']['tmp_name'];
if ($image)
{
$filename = stripslashes($_FILES['file']['name']);
$extension = getExtension($filename);
$extension = strtolower($extension);
if (($extension != "jpg") && ($extension != "jpeg") && ($extension != "png") && ($extension != "gif"))
{
$change='<div class="msgdiv">Unknown Image extension </div> ';
$errors=1;
}
else
{
$size=filesize($_FILES['file']['tmp_name']);
if ($size > MAX_SIZE*1024)
{
$change='<div class="msgdiv">You have exceeded the size limit!</div> ';
$errors=1;
}
if($extension=="jpg" || $extension=="jpeg" )
{
$uploadedfile = $_FILES['file']['tmp_name'];
$src = imagecreatefromjpeg($uploadedfile);
}
else if($extension=="png")
{
$uploadedfile = $_FILES['file']['tmp_name'];
$src = imagecreatefrompng($uploadedfile);
}
else
{
$src = imagecreatefromgif($uploadedfile);
}
echo $scr;
list($width,$height)=getimagesize($uploadedfile);
$newwidth=500;
$newheight=($height/$width)*$newwidth;
$tmp=imagecreatetruecolor($newwidth,$newheight);
/*$newwidth1=300;
$newheight1=($height/$width)*$newwidth1;
$tmp1=imagecreatetruecolor($newwidth1,$newheight1);*/
imagecopyresampled($tmp,$src,0,0,0,0,$newwidth,$newheight,$width,$height);
/*imagecopyresampled($tmp1,$src,0,0,0,0,$newwidth1,$newheight1,$width,$height);
*/
$filename = "upload/". $_FILES['file']['name'];
/*$filename1 = "images/small". $_FILES['file']['name'];
*/
imagejpeg($tmp,$filename,100);
/*imagejpeg($tmp1,$filename1,100);
*/
imagedestroy($src);
imagedestroy($tmp);
/*imagedestroy($tmp1);
*/}}
}
//If no errors registred, print the success message
if(isset($_POST['Submit']) && !$errors)
{
// mysql_query("update {$prefix}users set img='$big',img_small='$small' where user_id='$user'");
$change=' <div class="msgdiv">Image Uploaded Successfully!</div>';
}
$update = mysql_query("INSERT INTO `registration` SET `name`='".addslashes($name)."',`lname`='".addslashes($lname)."', `code`='1',`password`='".md5(addslashes($password))."',`pasword_hint`='".addslashes($password)."',`state`='".addslashes($state)."',`department`='".addslashes($department)."',`city`='".addslashes($city)."',`mobile_no`='".addslashes($mobile)."',`email_id`='".addslashes($email)."',`address`='".addslashes($add)."',`designation`='".addslashes($designation)."',`class`='".addslashes($class)."',`date_time`='".addslashes($date_time)."',`image`='".$filename."',`status`=0 ");
?>
<script type="text/javascript">
window.location='success.php?emailId=<?php echo $email;?>';
</script>
<?php } }?>
<!-- <iframe src="http://5.189.153.48:8080/vendorsms/pushsms.aspx?user=aganihotari%20 collage&password=aganihotari@123&msisdn=<?php echo $mobile; ?>&sid=AGNIHT&msg=Thank%20you%20for%20registering%20with%20Agnihotri%20College%20of%20Pharmacy%20Wardha.&fl=0&gwid=2" style="visibility:hidden;"></iframe> -->
<h4 style="color: red;"><?php echo $notMatch; ?></h4>
<form method="post" enctype="multipart/form-data">
<div class="span5">
<div class="form-horizontal">
<div class="control-group">
<label class="control-label" for="inputPassword">First Name :</label>
<div class="controls">
<input type="text" name="name" value="<?php echo $_POST['name']; ?>" placeholder="Enter First Name" required>
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputPassword">Last Name :</label>
<div class="controls">
<input type="text" name="lname" value="<?php echo $_POST['lname']; ?>" placeholder="Enter Last Name" required="required">
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputPassword">Enter Mobile No</label>
<div class="controls">
<input type="text" name="mobile" value="<?php echo $_POST['mobile'];?>" placeholder="Enter Mobile No" required>
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputPassword">Enter Email Id</label>
<div class="controls">
<input type="email" name="email" id="email" value="<?php echo $_POST['email'];?>" onBlur="checkemail()" placeholder="Enter Email Id Here" required>
<br/>
<span id="emailchecker"></span>
<p><img src="LoaderIcon.gif" id="loaderIcon" style="display:none" /></p>
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputPassword">Password</label>
<div class="controls">
<input type="password" name="password" value="<?php if (isset($_POST['submit'])){echo $password;} ?>" placeholder="Password" required>
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputPassword">Enter Designation</label>
<div class="controls">
<select name="designation" required="">
<option value="<?php echo $_POST['designation'];?>" selected="selected"><?php if($_POST['designation']!=""){ echo $_POST['designation']; }else{?>--Select Designation--<?php } ?></option>
<option value="Teacher">Teacher</option>
<option value="Student">Student</option>
</select>
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputPassword">Enter Department</label>
<div class="controls">
<select name="department" required="">
<option value="<?php echo $_POST['department'];?>"><?php if($_POST['designation']!=""){ echo $_POST['department']; }else{?>--Select Department--
<?php } ?></option>
<option value="Civil Engineering">Civil Engineering</option>
<option value="Mechanical Engineering">Mechanical Engineering</option>
<option value="Electronics And Telecommunication Engineering">Electronics And Telecommunication Engineering</option>
<option value="Computer And Science Engineering">Computer And Science Engineering</option>
<option value="Information Technology">Information Technology</option>
<option value="Master Of Technology">Master Of Technology</option>
</select>
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputPassword">Enter Semester</label>
<div class="controls">
<select name="class">
<option value="<?php echo $_POST['class'];?>"><?php if($_POST['class']!=""){ echo $_POST['class']; }else{?>--Select Semester--<?php } ?></option>
<option value="I Semester">I Semester</option>
<option value="II Semester">II Semester</option>
<option value="III Semester">III Semester</option>
<option value="IV Semester">IV Semester</option>
<option value="V Semester">V Semester</option>
<option value="VI Semester">VI Semester</option>
<option value="VII Semester">VII Semester</option>
<option value="VIII Semester">VIII Semester</option>
</select>
</div>
</div>
</div>
</div>
<div class="span6">
<div class="form-horizontal">
<div class="control-group">
<label class="control-label" for="inputPassword">Select State</label>
<div class="controls">
<select name="state" id="state">
<option value="">--Select States--</option>
<?php $states = mysql_query("SELECT * FROM `states` WHERE `country_id`=101");?>
<?php while($selectstates = mysql_fetch_assoc($states)){?>
<option value="<?php echo $selectstates['id'];?>"><?php echo $selectstates['name'];?></option>
<?php } ?>
</select>
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputPassword">Select Cities</label>
<div class="controls">
<select id="city" name="city">
<option value="">Select state first</option>
</select>
</div>
</div>
<b style="color: green;">Enter Address</b>
<div class="control-group">
<label class="control-label" for="inputPassword">Plot / House No.</label>
<div class="controls">
<input type="text" name="plot" value="<?php echo $_POST['plot'];?>" placeholder="Enter Plot / House Number">
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputPassword">Landmark / Area</label>
<div class="controls">
<input type="text" name="landmark" value="<?php echo $_POST['landmark'];?>" placeholder="Enter Landmark / Area">
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputPassword">Village</label>
<div class="controls">
<input type="text" name="village" value="<?php echo $_POST['village'];?>" placeholder="Enter Village">
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputPassword">Taluka</label>
<div class="controls">
<input type="text" name="taluka" value="<?php echo $_POST['taluka'];?>" placeholder="Enter Taluka">
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputPassword">District</label>
<div class="controls">
<input type="text" name="district" value="<?php echo $_POST['district'];?>" placeholder="Enter District">
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputPassword">Pin Code</label>
<div class="controls">
<input type="text" name="pinCode" value="<?php echo $_POST['pinCode'];?>" placeholder="Enter Pin Code">
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputPassword">Profile Picture</label>
<div class="controls">
<input type="file" name="file" value="">
</div>
</div>
<div class="control-group">
<div class="controls">
<button name="submit" type="submit" class="btn btn-info"><i class="icon-signin icon-large"></i> Submit</button>
</div>
</div>
</div>
</div>
</form>
<script type="text/javascript">
function checkcode() {
$("#loaderIcon").show();
jQuery.ajax({
url: "check_code.php",
data:'code='+$("#code").val(),
type: "POST",
success:function(data){
$("#useravailability-code").html(data);
$("#loaderIcon").hide();
},
error:function (){}
});
}
function checkemail() {
$("#loaderIcon").show();
jQuery.ajax({
url: "check_mail.php",
data:'username='+$("#email").val(),
type: "POST",
success:function(data){
$("#emailchecker").html(data);
$("#loaderIcon").hide();
},
error:function (){}
});
}
$(document).ready(function(){
$('#state').on('change',function(){
var stateID = $(this).val();
// alert(stateID);
if(stateID){
$.ajax({
type:'POST',
url:'ajaxData.php',
data:'state_id='+stateID,
success:function(html){
$('#city').html(html);
}
});
}else{
$('#city').html('<option value="">Select state first</option>');
}
});
});
</script>
<script type="text/javascript">
$(document).ready(function() {
$('#code').bind('copy paste cut',function(e) {
e.preventDefault(); //disable cut,copy,paste
alert('Plese type otp here !!');
});
});
</script>
<script>
Copyright © 1945 -