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

  • Home
  • SEARCH
  • 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 6659489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:02:26+00:00 2026-05-26T02:02:26+00:00

I have a php function which is called by a jquery function. This jquery

  • 0

I have a php function which is called by a jquery function. This jquery function will essentially place the picture on the page. I am having a hard time getting this to work right. I am trying to pin down where he problem might lie… My current line of thinking is that I am not sending the data back to my jquery function properly. Here is how I am getting the image

 if(mysql_query("insert into Personal_Photos (Email, Pics) values('$email', '$data')"))
 {
     $query="select Pics, MAX(ID) from Personal_Photos where Email='$email'";
     $result=mysql_query($query) or die("Error: ".mysql_error());
     $row=mysql_fetch_array($result);
     echo '<img src="data:image/jpeg;base64'.base64_encode($row['Pics']).'"/>';
 }

The key line is right here…

echo '<img src="data:image/jpeg;base64,'.base64_encode($row['Pics']).'"/>';

I am wondering if I am doing that incorrectly? How do you do it? Is there a better way to do it. If you notice anything else wrong with my code, I would definitely appreciate the criticism.

  • 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-05-26T02:02:27+00:00Added an answer on May 26, 2026 at 2:02 am
    data:[<MIME-type>][;charset=<encoding>][;base64],<data>
    

    You need a comma after the base64, which your code block doesn’t appear to have (though your individual line you posted has it). Which way is it in your real code?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So i have a page called region.php, which in the header, loads JQuery, the
I have a PHP value called per_page which I'm carrying on to a jQuery
I'd like to have a javascript function called on page load and unload which
I have a file called function.js which has all my jQuery for my aplication
i have a php function which returns a random json encoded color <?php function
I have a load of php templates which uses a custom translate function __,
I have a php function I wrote that will take a text file and
I I hafe a function which uses the $.prompt Jquery (impromptu) pluggin. This works
i have one jquery function which i need to work in following way 1.
I have a PHP script which calls exec() . I've been having trouble all

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.