Advertisement
Guest User

Untitled

a guest
May 28th, 2015
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. <?php
  2.  
  3. $con=mysql_connect("localhost","cmsmarthom_pond","55021744")or die("cannot connect");
  4. mysql_select_db("cmsmarthom_project")or die("cannot select DB");
  5.  
  6. //$strWhere = $_POST["username"];
  7. $strWhere = "pond";
  8.  
  9. $sql = "select * from timer_backup WHERE Username = '".$strWhere."' ";
  10. $result = mysql_query($sql);
  11. $json = array();
  12.  
  13. if(mysql_num_rows($result)){
  14. while($row=mysql_fetch_assoc($result)){
  15. $json['emp_info'][]=$row;
  16. }
  17. }
  18. mysql_close($con);
  19. echo json_encode($json);
  20. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement