How To Save Uploaded Image Names In Mysql Database
Part of this answered question I have beneath php code which upload one cropped image to 3 different width and height in avatar directory with width and height 200*200 avatar1 di
Solution 1:
copyImageFile('avatar1', $sTempFileName, 500, 500);
copyImageFile('avatar2', $sTempFileName, 700, 700);
replace this code after
include('connect/mysql.php');
$avatar1=copyImageFile('avatar1', $sTempFileName, 500, 500);
$avatar2=copyImageFile('avatar2', $sTempFileName, 700, 700);
$user_name = mysqli_real_escape_string($con, $_SESSION['UserName']);
mysqli_query($con,"UPDATE profiles SET AvatarImage='".$sResultFileName."',AvatarImageBig='".$avatar1."',AvatarImageSmall='".$avatar2."' WHERE UserName = '$user_name'");
mysqli_close($con);
Post a Comment for "How To Save Uploaded Image Names In Mysql Database"