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>"; 
}
  
?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.