Advertisement
Guest User

Untitled

a guest
Dec 19th, 2014
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. function change_profile_image($user_id, $file_temp, $file_extn){
  2. $file_path = 'image/profile/' . substr(md5(time()), 0, 10) . '.' . $file_extn;
  3.  
  4. move_uploaded_file($file_temp, $file_path);
  5. //echo $file_path;;
  6. mysql_query("UPDATE `user` SET `profile`= '". mysql_real_escape_string($file_path)."' WHERE `user_id` = " . (int)$user_id);
  7.  
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement