Re: resize a blob image?????

From: Date: Tue, 29 Aug 2000 20:40:51 +0000
Subject: Re: resize a blob image?????
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-14234@lists.php.net to get a copy of this message
<? MYSQL_CONNECT($hostname, $username, $password) OR DIE( "Unable to connect to database"); @mysql_select_db( "$dbName") or die( "Unable to select database"); //count totalrecords $totaldata = mysql_query( "SELECT Count(*) as total FROM $usertable") or die(mysql_error()); $rowtotal=mysql_fetch_Array($totaldata); $totaldata=$rowtotal[total]; //checking variable input $id if (($id == "") or ( $id > $totaldata )) { //echo "<font face=\"verdana\" size=-2>use like <img src=\"http://$HTTP_HOST$PHP_SELF?id=number\"><br>\n"; //echo "or just like this if on your own server <img src=\"$PHP_SELF?id=number\"><br>\n"; //query database $img_query = mysql_query( "select * from $usertable") or die(mysql_error()); while ($row = mysql_fetch_array($img_query)) { $idnum=$row[ "idnum"]; echo "or try this <a href=\"$PHP_SELF?id=$idnum\">http://$HTTP_HOST$PHP_SELF?id=$idnum</a><br>\n" ; /////this one i like to be a small picture but first i have to read out the blob you say!!!!!!!!!!!!! } echo "</font>"; echo"<a href=\"index.php3\"><<< Terug</a>"; MYSQL_CLOSE(); die; } else { $news_query = mysql_query( "select * from $usertable where idnum=\"$id\"") or die(mysql_error()); while ($row = mysql_fetch_array($news_query)) { $idnum=$row[ "idnum"]; $familie=$row[ "familie"]; } //add type a img file, change to other binary if you want :) //Header( "Content-type: image/gif"); //echo "$familie"; // this works fine though!!!!!!!!!!!!!!!!! But it is not what i want. // echo "<img height=\"300\" width=\"400\" src=\"lijst.php3?id=$idnum\"><br>"; // canot be done because it points to itself echo "<img height=\"300\" width=\"400\" src=\"???????????????????"><br>"; //so here i want to show the image, but also not the whole image!!!!! echo "<br><a href=\"index.php3\"><<< Terug</a>"; MYSQL_CLOSE(); } ?>

« previous php.general (#14234) next »