Advertisement
Guest User

Untitled

a guest
Aug 24th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.18 KB | None | 0 0
  1. <label class="col-sm-3 control-label">Picture</label>
  2. <div class="col-sm-9">
  3. <div class="fileinput fileinput-new" data-provides="fileinput">
  4. <div class="fileinput-preview thumbnail" data-trigger="fileinput" style="width: 200px; height: 150px;"><img style="height:200px;width:200px" src="http://192.000.00.00/~website/images/employee/<?php echo $row["emp_pic"] ?>"></div>
  5. <div>
  6. <span class="btn btn-default btn-file"><span class="fileinput-new">Select image</span><span class="fileinput-exists">Change</span><input type="file" name="k" value="http://192.000.00.00/~website/images/employee/<?php echo $row["emp_pic"] ?>"></span>
  7. <a href="#" class="btn btn-default fileinput-exists" data-dismiss="fileinput">Remove</a>
  8. </div>
  9. </div>
  10. </div>
  11. </div>
  12.  
  13. <form method="post" action="actions/add.php" class="form-horizontal row-border" enctype="multipart/form-data">
  14.  
  15. <?php
  16. session_start();
  17. include('../../includes/db_connection.php');
  18. ob_start();
  19. $k = $_POST['k'];
  20. $target = "../../images/employee/";
  21. $target = $target .$_FILES['k']['name'];
  22. $picc=$_FILES['k']['name'];
  23. $pic=($_FILES['k']['tmp_name']);
  24. move_uploaded_file($pic, $target);
  25.  
  26. $ins = mysql_query("UPDATE ehr_employee SET emp_specialization='$sp', emp_fname ='$b', emp_mname='$c', emp_lname='$d', emp_contact='$e', `emp_address`='$f', `emp_bday`='$g', `emp_doc_reg`='$h', `emp_pic`='$picc' where emp_id= $a ");
  27. $inss = mysql_query("UPDATE ehr_user SET user_username ='$x', user_password='$y' where emp_id= $a ");
  28. $inserted_record = mysql_affected_rows();
  29. $_SESSION["A"] = "EE" ;
  30. header('Location: ' . $_SERVER['HTTP_REFERER']);
  31.  
  32. ?>
  33.  
  34. <div class="form-group">
  35. <label class="col-sm-3 control-label">First Name</label>
  36. <div class="col-sm-6">
  37. <input type="text" class="form-control" name="b" id="b" readonly="readonly" value="<?php echo $row['emp_fname'] ?>">
  38. </div>
  39. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement