Advertisement
Guest User

Untitled

a guest
May 7th, 2016
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. <?php
  2.  
  3. $name = $_POST["name"];
  4. $designation=$_POST['designation'];
  5. $company=$_POST['company'];
  6. $email = $_POST["email"];
  7. $mobile=$_POST['mobile'];
  8. $workno=$_POST['workno'];
  9. $address=$_POST['address'];
  10. $association=$_POST['association'];
  11. $password = $_POST["password"];
  12. $username = $_POST["username"];
  13. $code=intval($_POST['code']);
  14. $id = 0;
  15.  
  16. while($row = mysqli_fetch_array($res)){
  17. $id = $row['id'];
  18. }
  19.  
  20. $image = $_POST['image'];
  21.  
  22.  
  23.  
  24. $path = "uploads/$id.png";
  25.  
  26.  
  27. $actualpath = "http://sumitmehra.esy.es/$path";
  28.  
  29. $insertquery = mysqli_prepare($con , "INSERT INTO yoring ( name ,designation , company, email, mobile, workno, address, association, password,username,code,pic) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)");
  30.  
  31. mysqli_stmt_bind_param($insertquery , "ssssiissssis", $name, $designation , $company, $email ,$mobile, $workno, $address, $association, $password,$username,$code,$actualpath);
  32. mysqli_stmt_execute($insertquery);
  33.  
  34. file_put_contents($path,base64_decode($image));
  35. mysqli_stmt_close($insertquery);
  36. mysqli_close($con);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement