Retrieving uploaded images

when retrieving uploaded images it adds %3Cbr behind the jpg file making it unreadable…any suggestions?

%3c is the URLEncoded form of <, so your image is ending with <br

My guess is your uploading has caught part of an error message, either in your HTML, or in the form handling script.

It does not add the %3Cbr to the uploaded file that I can see, It only adds it when I try to retrieve it.

how are you retrieving it?

 $staff_pic_file = mysqli_result($result, $x, 'staff_pic_file');

echo "<div class='thumbnail' />;
                    <img class='img-responsive' src = $staff_pic_file<br />";

wrap your code in triple backticks in forum posts:

mycode goes here
1 Like

so… you want to look at that line there… where does your img tag end?
(also you probably want to wrap that src in quotes - putting a variable in does not include the quote marks around it.)

Thanks all fixed echo "<img class='img-responsive' src = '$staff_pic_file' />"


This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.