lucan Posted April 5, 2011 Share Posted April 5, 2011 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 https://forums.phpfreaks.com/topic/232806-resize-image-after-uploading-to-databasefolder/ Share on other sites More sharing options...
gizmola Posted April 5, 2011 Share Posted April 5, 2011 Read this: gd Link to comment https://forums.phpfreaks.com/topic/232806-resize-image-after-uploading-to-databasefolder/#findComment-1197444 Share on other sites More sharing options...
lucan Posted April 5, 2011 Author Share Posted April 5, 2011 Thanks for this it looks like I did not have the GD install on Php5 now amended this and will play around with the codes. Link to comment https://forums.phpfreaks.com/topic/232806-resize-image-after-uploading-to-databasefolder/#findComment-1197488 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.