Here is an interesting one for you! I am building a Social Network and when a user signs up my system creates a directory to hold images, mp4's and the like.
I have written a script for profile avatar's that works perfectly fine but I have a cover image much like the facebook ones. The script is very similar to the avatar script but for some reason my system hangs on that scripts page and no errors show up.
Here is the part of the logic that should let the user upload a cover image...
include_once("../php_includes/image_resize.php");
$target_file = "../user/$log_username/$db_file_name";
$resized_file = "../user/$log_username/$db_file_name";
$wmax = 912;
$hmax = 320;
img_resize($target_file, $resized_file, $wmax, $hmax, $fileExt);
$sql = "UPDATE users SET herocover='$db_file_name' WHERE username='$log_username' LIMIT 1";
$query = mysqli_query($db_conx, $sql);
mysqli_close($db_conx);
header("location: ../user.php?u=$log_username");
exit();
}
As I have said before this is very similar to the avarat script and should work perfectly fine but for some reason nothing happens and no erros show up in my error log.
Thanks in advance.