We help IT Professionals succeed at work.
Get Started

Merge Image save to mysql database without clicking anything

Mico Beldad
Mico Beldad asked
on
49 Views
Last Modified: 2016-06-01
Can anyone help me about my problem?
I have successfully merge a image but i dont know how to insert it into DB

the code is something like this
 <?php
      $logo = "SecurityBank.png";
      $white_image = "image_size.png";
      $targetfile = "Phobo_New_Image.png";

      $Whitebackground = imagecreatefrompng($white_image);
      $whitebgW = imagesx($Whitebackground)-300;
      $whitebgH = imagesy($Whitebackground);
                        
      $partnerlogo = imagecreatefrompng($logo);
      $partnerlogoW = imagesx($partnerlogo);
      $partnerlogoH = imagesy($partnerlogo);
                  
      $photoFrame = imagecreatetruecolor($whitebgW,$whitebgH);
        $destlogo_x = $whitebgW - $partnerlogoW;
      $destlogo_y = $whitebgH - $partnerlogoH;
                  
      imagecopyresampled($photoFrame, $Whitebackground, 0, 0, 0, 0, $whitebgW, $whitebgH,$whitebgW, $whitebgH);
      imagecopy($photoFrame, $partnerlogo, $destlogo_x-300, $destlogo_y-400, 0, 0, $partnerlogoW, $partnerlogoH);
      imagepng($photoFrame, $targetfile);
?>
<center><img src="<?php echo $targetfile ?>" width="700px" name="target" id="target" height="400px"></center>'

<!-----THE NEW MERGED IMAGE IS BEEN SHOWED
name="target" id="target"
--->

I want to insert it into datbase my setTimeout or anything that the file $target is save into to the database as blob or longtext.
Comment
Watch Question
Most Valuable Expert 2011
Author of the Year 2014
Commented:
This problem has been solved!
Unlock 2 Answers and 2 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE