The Motorola Moto X



The Motorola Moto X- speedy camera
               Nice voice command well-crafted design.
               Great battery.
                 Easy customized designs

Amazon phone

Job At Shaheed Bhagat Singh College

Post For Assistant Professor in Shaheed Bhagat Singh College

Total Post : 48 posts
 Pay Scale : Rs. 15600 - 39100 grade pay Rs. 6000/- 

Applications Address:
Shaheed Bhagat Singh College, University of Delhi, Sheikh Sarai,
Phase-II, New Delhi – 110017 within 21 days from the date of advertisement,

 complete in all respect with self-attested copies of certificates, marksheets, testimonials etc.
with a demand draft of Rs.250/- for General /OBC and Rs.100/-for SC/ST/Pwd
 in favour of the Principal, Shaheed Bhagat Singh College, Delhi, Payable at Delhi
Last Date:  25/03/2014

View Details  http://www.sbsc.in  for  application form.

SBSC Delhi wants Assistant Professor

Applications are invited on the prescribed application forms for the posts of Assistant Professor in Shaheed Bhagat Singh College  in various subjects :

  • Assistant Professor : 48 posts in various subjects, 
  • Pay Scale : Rs. 15600 - 39100 grade pay Rs. 6000/-
Applications Step: Applications on the prescribed form must reach to the Principal, Shaheed
 Bhagat Singh College, (University of Delhi), Sheikh Sarai, Phase-II,
New Delhi – 110017 within 21 days from the date of advertisement,
complete in all respect with self-attested copies of certificates, marksheets,
testimonials etc., along with a demand draft of Rs.250/- for General /OBC
 and Rs.100/- for SC/ST/Pwd in favour of the
 Principal, Shaheed Bhagat Singh College, Delhi, Payable at Delhi on
Last Date: 25/03/201. 


View details http://www.sbsc.in  for details and application form.

Job At National Institute of Foundry and Forge Technology

National Institute of Foundry and Forge Technology
Hatia, Ranchi – 834003, Jharkhand
1. Foundry Technology
2. Forge Technology
3. Manufacturing Engineering
4. Materials and Metallurgical Engineering
5. Applied Science and Humanities :

  1. Assistant Professor  : 39 posts, Pay Scale :  Rs. 15600-39100 Grade Pay Rs 6000/-
  2. Associate Professor : 11 posts, Pay Scale :  Rs. 37400-67000 Grade Pay Rs 9000/-
  3. Professor : 07 posts, Pay Scale :  Rs. 37400-67000 Grade Pay Rs 10000/-
How to Apply : Completed applications in all aspects in the prescribed format and copies of self attested documents supporting qualification, experience, publications etc. should be sent to the address of the Director, NIFFT, Hatia, Ranchi-834003 latest by 5:00 PM, 15/05/2014.

 View Details
http://www.nifft.ernet.in/Faculty%20Recruitment%20Application%20Form_modified.pdf

Management Trainee Job At Coal India

Coal India Limited requires  Management Trainee
Posts:339

Environment-72, Sales & Marketing -31,
 Personnel-26, Finance -73,
Community Development-120, Materials Management-17
 Pay Scale : E2 grade Rs.20600-46500 and on successful completion of training will be posted in the E3 grade Rs.24900-50500,
Age : 30 years. Relaxation in age as per rules.

Application Fee : 
 Rs.500/- by means of a Bank DD in favour of Coal India Limited
 payable at Kolkata. No fee for SC/ST/PH

How to Apply :  Apply Online at Coal India Website from 17/03/2014 to 14/04/2014.
 Take a printout of the system generated application form and send it with application fee, relevant documents and pasting a recent passport size photograph on it in an envelope superscribed as with post applied for on or before 28/04/2014 to :  General Manager (Personnel/ Recruitment), Coal India Limited, 10, Netaji Subhas  Road, Kolkata - 700001.

http://www.coalindia.in/career/en-us/CurrentOpening.aspx

PHP registration form-code-demo






PHP registration form-code-demo



<?php
//error_reporting(0);
 session_start();
 include "include/connection.php";
 include "include/functions.php";
 $fname='';
 $lname='';
 $dob='';
 $email='';
 $phone='';
 $capital_city='';
 $locality='';
 $pwd='';
 $repwd='';
 $msg='';
 if(isset($_POST['registration']))
 {
 $fname=trim($_POST['f_name']);   
 $lname=trim($_POST['l_name']);
 if($_POST['dob']!=''){
 $dob=getRevDate($_POST['dob']);
 }
 $email=trim($_POST['email']);
 $phone=trim($_POST['phone']);
 $capital_city=trim($_POST['capital_city']);
 $locality=trim($_POST['locality']);
 $pwd=trim($_POST['pwd']);
 $repwd=trim($_POST['repwd']);

 $confirm_code=md5(RandomString());
 

 if($fname=='')
 $msg='please enter first name';
 else if($lname=='')
 $msg='Please enter last name';
 else if($dob=='')
 $msg='Please enter date of birth';
 else if($email=='')
 $msg='Please enter email';
 else if(!filter_var($email, FILTER_VALIDATE_EMAIL))
 $msg='Please enter valid email';
 else if(chkEmailExist('users',$email))
 $msg='Email allready register';
 else if($phone=='')
 $msg='Please enter phone no';
 else if(!is_numeric($phone))
 $msg='Phone no should be numeric';
 else if($capital_city=='')
 $msg='Please enter capital city';
 else if($pwd=='')
 $msg='Please enter password';
 else if(strlen($pwd)<6)
 $msg='Password lenght should be minimum 6 character';
 else if($repwd=='')
 $msg='Please enter repassword';
 else if($pwd!=$repwd)
 $msg='Password and repassword should be same';
 else{
echo $sql="insert into `users` set `email`='$email',`password`='$pwd',`status`='3',`confirm_code`='$confirm_code'";
 $res=mysql_query($sql);
echo $user_id=mysql_insert_id();
 if($res){
echo $sql1="insert into `user_profile` set    `userId`='$user_id',
                                            `firstName`='$fname',
                                            `lastName`='$lname',
                                            `dob`='$dob',
                                            `email`='$email',
                                            `phoneNo`='$phone',
                                            `capital_city`='$capital_city',
                                            `locality`='$locality',
                                            `status`='2'
                                            ";   
                                           
 $res1=mysql_query($sql1);
 $_SESSION['userId']=$user_id;
 $_SESSION['UserName']=$fname;
 if($res1){

    $email_content_rg=getEmailContent(1);

    $headers = "MIME-Version: 1.0" . "\r\n";
    $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";   
    $subject=$email_content_rg['subject'];
   
    $message ="Hi,<br/>&nbsp;&nbsp;&nbsp;".$fname." ".$lname."<br/><br/><br/>";
    $message .=$email_content_rg['content'];
   
    $message .="<br/><br/><a href='http://".$_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF'])."/confirmation.php?act=confregis&a=".urlencode($user_id)."&b=".$confirm_code."' >Please Click the link to activate your registration.. </a>";   
   
    mail($email,$subject,$message,$headers);
   
 /*header("Location:index.php?m=rs");*/
 header("Location:profile.php");
 }
 }else{
 $msg='Registration unsuccesful';   
 }
 }

 }
//echo $msg;
?>



<?php  include "include/header.php";  ?>


<div class="container">
<div class="row" align="center" style="margin-top:30px;">
<div class="span12">
<div class="row">
<div class="span6">
<div class="thumbnail">
     <h4>Registration</h4>
     <p>
    <form class="form-horizontal" name="reg" id="reg" action="#" method="post">
    <div class="control-group">
    <label class="control-label">First Name</label>
    <div class="controls">
    <input type="text" name="f_name" id="rf_name" value="<?php echo $fname; ?>" placeholder="First Name">
    </div>
    </div>
   
    <div class="control-group">
    <label class="control-label" >Last Name</label>
    <div class="controls">
    <input type="text" name="l_name" id="rl_name" value="<?php echo $lname; ?>" placeholder="Last Name">
    </div>
    </div>
   
    <div class="control-group">
    <label class="control-label" >Date of birth</label>
    <div class="controls">
    <input type="text" name="dob" id="r_dob" value="<?php if($dob!=''){ echo getRevDate($dob); } ?>" placeholder="Date of birth">
    </div>
    </div>
   
    <div class="control-group">
    <label class="control-label">Email</label>
    <div class="controls">
    <input type="text" name="email" id="r_email" value="<?php echo $email; ?>" placeholder="Email">
    </div>
    </div>
   
    <div class="control-group">
    <label class="control-label">Phone</label>
    <div class="controls">
    <input type="text" name="phone" id="r_phone" value="<?php echo $phone; ?>" placeholder="phone">
    </div>
    </div>
   
    <div class="control-group">
    <label class="control-label">City</label>
    <div class="controls">
    <!--<input type="text" name="capital_city" id="r_capital_city" value="<?php //echo $phone; ?>" placeholder="phone">-->
    <select name="capital_city" id="r_capital_city" onChange="return getLocalityList()">
     <option value="">Select capital city</option>
      <?php echo getCapitalCityList($capital_city);  ?>
    </select>
    </div>
    </div>
   
    <div class="control-group">
    <label class="control-label">Locality</label>
    <div class="controls">
   <!-- <input type="text" name="related_city" id="r_related_city" value="<?php //echo $phone; ?>" placeholder="phone">-->
    <select name="locality" id="r_locality">
    <option value="">Select locality</option>
      <?php if($capital_city!=''){ echo getLocalityList($capital_city,$locality); }  ?>
    </select>
    </div>
    </div>   
   
    <div class="control-group">
    <label class="control-label">Password</label>
    <div class="controls">
    <input type="password" name="pwd" id="r_pwd" value="<?php echo $pwd; ?>" placeholder="Password"><span id="result"></span>
    </div>
    </div>
   
    <div class="control-group">
    <label class="control-label" >Re-type Password</label>
    <div class="controls">
    <input type="password" name="repwd" id="r_repwd" value="<?php echo $repwd; ?>" placeholder="Re-type Password"><span id="result"></span>
    </div>
    </div>
   
    <div class="control-group">
    <div class="controls">
    <input type="hidden" name="registration" id="registration" value="registration" >
    <button type="button" class="btn btn-primary" onClick="subRegistraiton()">Sign in</button>
    </div>
    </div>
    </form>
     </p>
    </div>
</div>
<div class="span6">
<div class="thumbnail">
     <h4>Already Registered</h4>
     <p>
    <form class="form-horizontal" name="loginForm" action="index.php" method="post">
    <div class="control-group">
    <label class="control-label">User Id</label>
    <div class="controls">
    <input type="text" name="userName" id="l_userName" placeholder="Userid">
    </div>
    </div>
    <div class="control-group">
    <label class="control-label" >Password</label>
    <div class="controls">
    <input type="password" name="password" id="l_password"  placeholder="Password">
    </div>
    </div>
   
    <div class="control-group">
    <div class="controls">
     <input type="hidden" name="login" value="login" >
   <button type="button" class="btn btn-primary" id="LoginButton" onClick="return subLogin()">Login</button>
    </div>
    </div>
    </form>
     </p>
    </div>

</div>


</div>
</div>


</div>


<?php include "include/footer.php";?>
   

<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="js/bootstrap.js"></script>
<!-------------------------------------------------For Date Picker----------------------------------------------------------->
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<!------------------------------------------------------------------------------------------------------------>
<script type="text/javascript">
$(function() {     
 var $j = jQuery.noConflict();
 $j("#r_dob").datepicker({ dateFormat: "dd-mm-yy",changeMonth: true,changeYear: true,yearRange:'-90:+0'}).val();
});
     
</script>

<script>
$.noConflict();
function subRegistraiton()
{
 var fname=$('#rf_name').val();
 var lname=$('#rl_name').val();
 var dob=$('#r_dob').val();
 var email=$('#r_email').val();
 var phone=$('#r_phone').val();
 var capital_city=$('#r_capital_city').val();
 var locality=$('#r_locality').val();
 var pwd=$('#r_pwd').val();
 var repwd=$('#r_repwd').val();
 var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

 if(fname=='')
 {
   alert('Please enter first name');
   $('#rf_name').focus();
   return false;
   
 }
 else if(lname=='')
 {
   alert('Please enter last name');
   $('#rl_name').focus();
   return false;    
 }
 else if(dob=='')
 {
   alert('Please enter date of birth');
   $('#r_dob').focus();
   return false;    
 }
 else if(email=='')
 {
   alert('Please enter email');
   $('#r_email').focus();
   return false; 
 }
 else if(!filter.test(email))
 {
   alert('Please provide a valid email address');
  // $('#r_email').val('');
   $('#r_email').focus();
   return false;
 }
 else if(phone=='')
 {
   alert('Please enter phone no');
   $('#r_phone').focus();
   return false; 
 }
 else if(phone.length!=10)
 {
   alert('Phone number should be 10 digits');   
   $('#r_phone').focus();
   return false; 
 }
 else if(capital_city=='')
 {
   alert('Please select capital city');   
   $('#r_capital_city').focus();
   return false; 
 }
 else if(pwd=='')
 {
   alert('Please enter password');
   $('#r_pwd').focus();
   return false; 
 }
 else if(pwd.length < 8)
 {
   alert("Please enter at least 8 characters");   
   $('#r_pwd').val('');
   $('#r_pwd').focus();
   return false; 
 }
 else if(repwd=='')
 {
   alert('Please enter re-password');
   $('#r_repwd').focus();
   return false; 
 }
 else if(pwd!=repwd)
 {
   alert('Password and repassword does not match');
   $('#r_repwd').val('');
   $('#r_repwd').focus();
   return false;
 }else{
   
    document.reg.submit();
    $.loader();
  //  setTimeout( "$.loader('close');",20000 );   
 }
   
   
}

function subLogin()
{
 var userName=$("#l_userName").val();   
 var password=$("#l_password").val();   

 if(userName==''){
 alert('Please enter username');
 $("#l_userName").focus();
 return false
 }
 else if(password=='')
 {
 alert('Please enter password');
 $("#l_password").focus();
 return false;   
 }else{
 document.loginForm.submit();
 $.loader();
// setTimeout( "$.loader('close');",10000 );       
 }
}


function getLocalityList()
{
 var capitalCity=$("#r_capital_city").val();   

 $.ajax({
   type: 'POST',
   url: 'ajax/ajax_cityList.php',
   data: {'capital_city' : capitalCity ,'action' : 'locality'}, 
   success: function(data){
   $("#r_locality").html(data);
   }
});   
       
}
</script>

       
<script>
<?php
if($msg!=''){
?>
alert('<?php  echo $msg; ?>');
<?php
}
?>
</script>

<script>
    $(function(){
        $(window).keypress(function(ev){
            if(ev.charCode == 99)
            {
                $.loader('close');
            }
        });
        $('#test1button1').click(function(){
            $.loader();
            setTimeout( "$.loader('close');",3000 );
        });
       
    });
</script>

File uploaded code-with-validation-PHP




 PHP File uploaded code-with-IMAGE EXTENSION Validation


<?php
 session_start();
 include "include/connection.php";
 include "include/functions.php";
 $userId=$_SESSION['userId'];
 if(!isset($_SESSION['userId'])){
  header("Location:index.php");    
 }
 $prof_type=@$_REQUEST['tp'];
 $msg='';

 if(isset($_POST['subProfileImage']))
 {
  $extArray=array("jpg","jpeg","png","gif");    
  $profImageName=$_FILES['profImage']['name'];
  $fileSize=$_FILES['profImage']['size'];
  $ext =strtolower(pathinfo($profImageName, PATHINFO_EXTENSION));
 
  if($profImageName=='')
  {
      $msg='Please select an image';
  }
  else if(!in_array($ext,$extArray))
  {
     $msg="Please select 'jpg','jpeg','png','gif' type image extension";
  }
  else if($fileSize > 13072400)
  {
    //$msg='Please select image size lessthan 300kb';
  }
  else{
    $imageName=time().$_FILES['profImage']['name'];
    if(move_uploaded_file($_FILES['profImage']['tmp_name'],"upload/prof_photo/".$imageName))
    {
      $oldImgLink=getProfImageLink($userId);  
      $sql="update `user_profile` set `imageLink`='$imageName' where `userId`='$userId'";
      mysql_query($sql);
      @unlink("upload/prof_photo/".$oldImgLink);
    }    
  }    
 }

 $sql_prof="select * from `user_profile` where `userId`='$userId' ";
 $res_prof=mysql_query($sql_prof);
 $r_prof=mysql_fetch_array($res_prof);


 ?>





HTML   form



 <form name="profImageForm" id="profImageForm" action="" method="post" enctype="multipart/form-data">
<h3 id="myModalLabel">Change Profile Pictute</h3>
</div>
<div class="modal-body">
<p>
 <input class="btn btn-primary" type="file" name="profImage" placeholder="Browse for File">
</p>
</div>
<div class="modal-footer">
<input type="hidden" name="tab" id="tabProfileType"  value="<?php echo $prof_type;  ?>" />
<input type="hidden" name="subProfileImage" id="subProfileImage" value="subProfile" />
<button class="btn btn-primary" onClick="return profImageSubmit()">Save changes</button>
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
</form>
</div>
</div>
     <div class="span7">
       <div id="personalDetails" style="display:<?php echo $t = ($prof_type=="") ? "none" : "none" ; ?>;" >
         <form class="form-horizontal" name="profileForm" id="profileForm" action="#" method="post">
          <!-- <input type="hidden" name="persionalStatus" id="persionalStatus" value="<?php //echo $r_prof['status'];  ?>" >-->
           <legend>Your Contact Information</legend>
           <div class="control-group">
             <label class="control-label" for="inputEmail">First Name</label>
             <div class="controls">
               <input type="text" name="fname" id="p_fname" value="<?php echo $r_prof['firstName']; ?>" placeholder="Full Name">
             </div>
           </div>
           <div class="control-group">
             <label class="control-label" for="inputEmail">Last Name</label>
             <div class="controls">
               <input type="text" name="lname" id="p_lname" value="<?php echo $r_prof['lastName']; ?>"  placeholder="Last Name">
             </div>
           </div>
           <!--<div class="control-group">
             <label class="control-label" for="inputEmail">Nickname</label>
             <div class="controls">
               <input type="text" name="nickname" id="p_nname" value="<?php //echo $r_prof['nickName']; ?>"  placeholder="Nickname">
             </div>
           </div>-->
           <div class="controls">
             <div class="radio">
               <label>
                 <input type="radio" name="gender" id="p_gender" value="m" <?php if($r_prof['gender']=='m'){ echo 'checked'; }?> >
                 Male</label>
             </div>
             <div class="radio">
               <label>
                 <input type="radio" name="gender" id="p_gender" value="f"  <?php if($r_prof['gender']=='f'){ echo 'checked'; }?>>
                 Female</label>
             </div>
           </div>
           <p></p>
           <div class="control-group">
             <label class="control-label" for="inputEmail">Date of Birth</label>
             <div class="controls">
               <input type="text" name="dob" id="p_dob" value="<?php echo getRevDate($r_prof['dob']); ?>"  placeholder="DOB">
             </div>
           </div>
           <div class="control-group">
             <label class="control-label" for="inputEmail">Mobile No</label>
             <div class="controls">
               <input type="text" name="phoneNo" id="p_phoneNo" value="<?php echo $r_prof['phoneNo']; ?>"  placeholder="Mobile No">
             </div>
           </div>
           <div class="control-group">
             <label class="control-label" for="inputPassword">Capital City</label>
             <div class="controls">
               <select name="capital_city" id="p_capital_city" onChange="return getLocalityList()">
                 <option value="">Select capital city</option>
                  <?php echo getCapitalCityList($r_prof['capital_city']);  ?>
                </select>
             </div>
           </div>
           <div class="control-group">
             <label class="control-label" for="inputPassword">Locality</label>
             <div class="controls">
               <select name="locality" id="p_locality">
                <option value="">Select locality</option>
                  <?php  echo getLocalityList($r_prof['capital_city'],$r_prof['locality']);  ?>
                </select>
             </div>
           </div>
           <div class="btn-group" >
             <input type="hidden" name="updateProf" id="updateProf" value="updateProf" />
             <button type="submit" class="btn btn-primary" id="" onClick="return submitProfile()">Submit</button>
             <button type="reset" class="btn">Reset</button>
             <!--<button type="reset" class="btn">Cancel</button>-->
           </div>
         </form>






php include file-dem-code



PHP include file-dem-code


<?php
include "include/connection.php";
 include "include/functions.php";

?>


----------------------------->
<?php
 session_start();

/* if(@$_REQUEST['userId']!='')
 {
 $_SESSION['showUserId'] = $_REQUEST['userId'];   
 header("Location:showUserProfile.php");   
 }*/
 if(@$_SESSION['userId']=='')
 {
 header("Location:index.php");   
 }
 include "include/connection.php";
 include "include/functions.php";
 $msg='';
// $userId=$_SESSION['showUserId'];
 $userId=$_SESSION['userId'];
 $sql_prof="select * from `user_profile` where `userId`='$userId' ";
 $res_prof=mysql_query($sql_prof);
 $count=mysql_num_rows($res_prof);
 $r_prof=mysql_fetch_array($res_prof);

 if($count < 1){
  header("Location:index.php");   
 }

 ?>

simple contactus page-php-code-demo



 Simple contactus page-php-code-demo 

 with javascript validation


<?php
 session_start();
 include "include/connection.php";
 include "include/functions.php";
 include "include/header.php";
//$r=getCMSPageContent(8);
 $current_date=date('Y-m-d');
 $msg='';

 if(isset($_POST['submit_contact']))
 {
  $fname=trim($_POST['fname']);
  $lname=trim($_POST['lname']);
  $email=trim($_POST['email']);
  $contact_no=trim($_POST['contact_no']);
  $address=addslashes(trim($_POST['address']));
  $ip_add=$_SERVER["REMOTE_ADDR"];
 
  $sql="insert into `sp_contactus` set `fname`='$fname',
                                          `lname`='$lname',
                                          `email`='$email',
                                          `contact_no`='$contact_no',
                                          `address`='$address',
                                          `ip_add`='$ip_add',
                                          `creation_date`='$current_date'
                                          ";
   
    $res=mysql_query($sql);
    if($res)
    {
      $msg="Your contact details are recive ..";   
    }
 }

 ?>

<div class="container">
<div class="row" style="margin-top:30px;">
<div class="span6">
<div class="thumbnail" style="padding:30px;">
      <h4>We are Located at :-</h4>
      <p style="text-align:justify;">
          <address>
    <strong>TestTeam</strong><br>
            PO Box 654, Westmead,<br>
            NSW, 26545<br>
            Australia<br>
           
    </address>
    
    <address>
    <strong>Email us at</strong><br>
    <a href="mailto:#">info@test.com</a>
    </address>
      </p>
</div>
</div>
<div class="span6">
<p>

    <form class="form-horizontal" name="contact" id="contact" action="" method="post">
    <legend>Contact Us</legend>
    <div class="control-group">
    <label class="control-label" for="inputEmail">First Name</label>
    <div class="controls">
    <input type="text" name="fname" id="fname"  placeholder="First Name">
    </div>
    </div>
    <div class="control-group">
    <label class="control-label" for="inputEmail">Last Name</label>
    <div class="controls">
    <input type="text" name="lname" id="lname" placeholder="Last Name">
    </div>
    </div>
    <div class="control-group">
    <label class="control-label" for="inputPassword">Email Id</label>
    <div class="controls">
    <input type="email" name="email" id="email" placeholder="Email Id">
    </div>
    </div>
    <div class="control-group">
    <label class="control-label" for="inputPassword">Contact No</label>
    <div class="controls">
    <input type="text" name="contact_no" id="contact_no" placeholder="Contact No">
    </div>
    </div>
    <div class="control-group">
    <label class="control-label" for="inputPassword">Address</label>
    <div class="controls">
    <textarea name="address" id="address" rows="5"></textarea>
    </div>
    </div>
    <div class="control-group">
    <div class="controls">
    <input type="hidden" name="submit_contact" value="submit_contact" >
    <button type="button" class="btn btn-primary" onClick="return submit_contact_us()">Send</button>
    </div>
    </div>
    </form>
</p>
    </div>
</div>
<?php include("include/footer.php");?>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>

<script language="javascript">
function submit_contact_us()
{
 var fname=$("#fname").val();
 var lname=$("#lname").val();
 var email=$("#email").val();
 var contact_no=$("#contact_no").val();
 var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
 
 if(fname=='')
 {
   alert('Please enter first name');   
   $("#fname").focus();
   return false;
 }
 else if(lname=='')
 {
   alert('Please enter last name');   
   $("#lname").focus();
   return false;
 }
 else if(email=='')
 {
   alert('Please enter your email');   
   $("#email").focus();
   return false;
 }
 else if(!filter.test(email))
 {
   alert('Please provide a valid email address');   
   $("#email").focus();
   return false;   
 }
 else if(contact_no=='')
 {
   alert('Please enter your contact no');   
   $("#contact_no").focus();
   return false;
 }
 else if(isNaN(contact_no))
 {
   alert('Contact no should be numeric');   
   $("#contact_no").focus();
   return false;
 }else {
  document.contact.submit();
 }
}


<?php if($msg!=''){ ?>
 alert("<?php echo $msg; ?>");   
<?php } ?>

</script>

mysql_fetch_array-code-demo


 Example-1

 mysql_fetch_array  code demo

<?php
//error_reporting(0);
 session_start();
 include "include/connection.php";
 include "include/functions.php";

 if(@$_REQUEST['act']=='confregis')
{
 $user_id=urldecode($_REQUEST['a']);
 $confirm_code=$_REQUEST['b'];
 $sql="select * from `users` where `id`='$user_id' and `confirm_code`='$confirm_code'";
 $res=mysql_query($sql);
 $count=mysql_num_rows($res);
 $r=mysql_fetch_array($res);

 if($count > 0)
 {
   
        $sql1="update `users` set `status`='1' where `id`='$user_id'";
        mysql_query($sql1);
       
        $sql2="select * from `users` where `id`='$user_id' and `status`='1'";
        $res2=mysql_query($sql2);
        $row2=mysql_fetch_array($res2);
        $_SESSION['userId']=$row2['id'];
        $_SESSION['UserName']=getUserNameByuserId($r['id']);
        //$_SESSION['adviser_email']=$row['email'];
        header('Location: Location:profile.php');
   
 }
}


header('Location: index.php');
 ?>

Example-2




<?php
echo  $sql="select * from `user_profile` up,`user_freelance` uf,list_industry ind,list_functional_area fa
                                    where up.userId=uf.userId
                                    and uf.industryName=ind.id
                                    and uf.functionalArea=fa.id
                                    and (ind.`industryName` like '%$attrName%' or fa.functionalArea = '%$attrName%')
                                    and up.`status`='1'
                                    and uf.`status`='1' ";

  $sql="select * from `user_profile` up,`user_freelance` uf,list_industry ind,list_functional_area fa
                                    where up.userId=uf.userId
                                    and uf.industryName=ind.id
                                    and uf.functionalArea=fa.id
                                    and (ind.`industryName` like '%$attrName%' or fa.`functionalArea` like '%$attrName%')
                                    and up.`status`='1'
                                    and uf.`status`='1' ";

$res= mysql_query($sql);
$count=mysql_num_rows($res);
while($r=mysql_fetch_array($res)){

?>