hi i want to fetch the total user count of given referral ids in table i have tried using left join but i am getting duplicate results from mysql.
i am attac
In php manual, describe the function imagejpeg( resource $image [, string $filename [, int $quality ]] )
imagejpeg() creates a JPEG file from the given image
An image resource, returned by one of the image creation functions, such as
imagecreatetruecolor()
or
resource imagecreatefromjpeg ( string $filename )
then you can use imagejpeg to output an image
I don't see why you need ajax anyway. collage.php
returns a valid image, so you can use the link used for your ajax call as the img
tag src
url. Just pass any variables you may need through the query string.
Example:
var queryString = $('#' + form).serialize();
$('#image').html('<img src="collage.php?' + queryString + '"/>');
Change the JS to:
function post(form)
{ loading(1);
$.ajax({ type: 'POST',
dataType: 'image/jpeg',
url: 'collage.php',
data: $('#'+form).serialize(),
success: function(data)
{ $('#image').html('<img src="data:'+base64_encode(data)+'"') }
});
return false; }
See This question for information about implementing base64_encode
in JS.