Jump to content

resize image after uploading to database/folder


lucan

Recommended Posts

 

I am looking to resize the images (hight and width) after I have uploaded to a folder with php. What the bast way to do this. I am unable to resize them before I upload as I use the same picture in other areas.

I'm using this code to view the image and other infomation on the database can some one point me in the right direction or show me how to change the code below.  Thanks

 


<?php 

  mysql_connect("localhost", "", "") or die(mysql_error()) ; 
mysql_select_db("stafflog") or die(mysql_error()) ; 

  
$data = mysql_query("SELECT * FROM  ********") or die(mysql_error());  
while($info = mysql_fetch_array( $data )) 
{ 

echo "<img src=http://www.web.com/productimages/" .$info['image'] . "> <br>"; 
echo "<b>Name:</b> ".$info['yourname'] . "<br> "; 
echo "<b>price:</b> ".$info['price'] . " <br>"; 
echo "<b>shortdes:</b> ".$info['shortdes'] . " <hr>"; 
}
  
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.