Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8847161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:08:23+00:00 2026-06-14T12:08:23+00:00

So my last question was on how to have my techID shown from a

  • 0

So my last question was on how to have my techID shown from a search :

I am trying to have my "Details" page to reference two seperate parts of my server that are linked via techID

My new question is still on this page. I have added in an echo image as well. but am having trouble using Blob and having it display my image and not binary JPEG data.
I’ve been trying to find another instance of this but cannot find any that fix my error.

//Header ('Content-type: image/jpeg')
echo "<dt><strong>Technician Image:</strong></dt><dd>" . '<img src='.$row2['image'].' width="290" height="290">' . "</dd>";

and

$query_Recordset2 = "SELECT * FROM technician WHERE techID=" . $row1["techID"] ;
$Rs2 = mysql_query($query_Recordset2) or die(mysql_error());

Are the only changes I have put in so far from my last question (obviously including the fix I was given that worked).

What I do not understand is where and how to put 'Content-type: image/jpeg' to have my page recognize the image being linked is it’s MIME TYPE image/jpeg.

What I am seeing on my page is this

Technician Image:
�E��j��i`=7f$D��o”�������b���Ckkc��R��^M�;n~��0&m)J��R��E)JDR��E)JDR��E)JDR��E)JDR��E)JDR��E)JDSjR��)���+��N��.R,u����i��n9,���QX~
����{(����̮�:���2�12��”��aV7�6���{���LP[�W�����گ� R$+�
��LMc’hM�5�o�PA����|���ګ���.8��E��ģ��Rn
��1�[��{��3>�rY��X�ۜ;�Ǖ����u���z��’�vf�N葟
��z�Q�����k��3���O��ܨ�ۀ�?S���,N� �����[{+D�
�;�’�$�$�&�iJR��)JR��)JR��)JR��)JR��)JR��)JR��)JR��)JR��)JR��)JR��)JR��)��
width=”290″ height=”290″>

Obviously I have deleted a middle chunk so it’s not massive. there is a little “Broken image” box that appears infront and when I right click and choose “Open image in new window” the URL it puts in is simply Content-type: or I get a forbidden access page with the url http:// localhost/Sim5Server/Pages/%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%10JFIF%EF%BF%BD%01%02%EF%BF%BD%EF%BF%BDd%EF%BF%BDd%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BDC%EF%BF%BD

I have put a space in that url since it is not a link for the internet.

I have only used normal BLOB type as I just need it as a small less than 64Kb image

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T12:08:23+00:00Added an answer on June 14, 2026 at 12:08 pm

    In your current case, you have two upfront options.

    The first, and the one I don’t recommend if you have numerous images like this, is to use inline base64 encoding. This is done with:

    <img src="data:image/jpeg;base64,<?php echo base64_encode($image); ?>" />
    

    A copy/paste version, using your existing code:

    echo '<dt><strong>Technician Image:</strong></dt><dd>'
         . '<img src="data:image/jpeg;base64,' . base64_encode($row2['image']) . '" width="290" height="290">'
         . '</dd>';
    

    The second method is to create an “image” PHP file that takes the ID of the image in the database as a query-string parameter and outputs the image. So, your HTML would look something like:

    <img src="image.php?id=<?php echo $image_id; ?>" />
    

    And your PHP page would look something similar to:

    <?php
    $id = (isset($_GET['id']) && is_numeric($_GET['id'])) ? intval($_GET['id']) : 0;
    $image = getImageFromDatabase($id); // your code to fetch the image
    
    header('Content-Type: image/jpeg');
    echo $image;
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have gotten a great deal of help from KandadaBoggu on my last question
Okay, so this is a carry on from my last question, but I have
building on my last question jQuery getting values from multiple selects together I have
I have a byte array containing bytes from a file( see my last question
From my last question , I have new idea for database protection. The following
Continuing from my last question C++ template class map I have implemented the function
I have got an answer from my last question about translating an XML file
In some measure of progress since my last question I have got the following
After having my last question answered , I have never see the preventDefault(); function
This is a followup to my last question . I now have a byte[]

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.