shage Posted June 23, 2007 Share Posted June 23, 2007 Anyone can help or point me in the right direction on how to use variable in url, to make all images on that page whatever the ratio would be, like for instance 3:1 or 2:1 or whatever, i hope i explained that good enough Quote Link to comment https://forums.phpfreaks.com/topic/56834-picture/ Share on other sites More sharing options...
Wuhtzu Posted June 23, 2007 Share Posted June 23, 2007 Something like: picture.php?w=4&h=3 //Get the width (4) $width = $_GET['w']; //Get the height (3) $height = $_GET['h']; //Calculate the ratio (4/3) $ratio = $width / $height; Maybe this will point you in some direction, but you need to be more specific if you want more specific help. It's hard to guess if you want to resize the images with PHP/GD Lib or just want to set the height/width attributes in a html <img>-tag ect... Quote Link to comment https://forums.phpfreaks.com/topic/56834-picture/#findComment-280837 Share on other sites More sharing options...
shage Posted June 23, 2007 Author Share Posted June 23, 2007 thats perfect to call that in a img src would be to just use variable right? Im learning slowly but your a good mind reader Quote Link to comment https://forums.phpfreaks.com/topic/56834-picture/#findComment-280840 Share on other sites More sharing options...
shage Posted June 23, 2007 Author Share Posted June 23, 2007 please if you know where to look let me know, i need to figure a way to have a set size incase user does not pick size Quote Link to comment https://forums.phpfreaks.com/topic/56834-picture/#findComment-280841 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.