I am echoing the data received from a blob column from mysql like this:
<?php
$con = mysql_connect("localhost","username","pass");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("mydb", $con);
if(isset($_GET['imageid'])){
$img=$_GET['imageid'];
$sql="SELECT image FROM vrzgallery WHERE id=$img";
$que=mysql_query($sql);
$ar=mysql_fetch_assoc($que);
echo $ar['image'];
header('Content-type: image/jpeg');
}
?>
QUESTION: How can i reduce my image to say like 500px X 500px