Guest User

Untitled

a guest
Jul 1st, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. <?php
  2. $pic = $_POST['pic']
  3.  
  4. $mysql_host = "localhost";
  5. $mysql_database = "opthabas_db";
  6. $mysql_user = "opthabas_user";
  7. $mysql_password = "Password";
  8.  
  9. $con = mysql_connect($mysql_host, $mysql_user, $mysql_password);
  10. if (!$con)
  11. {
  12. die('Could not connect: ' . mysql_error());
  13. }
  14. //mysql_query("UPDATE Profile SET Image = '$pic' ");
  15. mysql_query("UPDATE Profile SET Image = '$pic' ");
  16.  
  17. mysql_select_db("opthabas_db", $con);
  18.  
  19. $pic = mysql_real_escape_string($pic);
  20. mysql_query("INSERT INTO Profile (Images) VALUES ('$pic')");
  21.  
  22. mysql_close($con);
  23. ?>
Add Comment
Please, Sign In to add comment