Guest User

Untitled

a guest
Jul 1st, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.50 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.  
  15. mysql_select_db("opthabas_db", $con);
  16.  
  17. $pic = mysql_real_escape_string($pic);
  18. //mysql_query("INSERT INTO Profile (Images) VALUES ('$pic')");
  19. mysql_query("UPDATE `Profile` SET Image = '$pic' ");
  20. mysql_close($con);
  21. ?>
Add Comment
Please, Sign In to add comment