getimagesize help
Posted: Mon Sep 14, 2009 11:12 pm
having trouble with this code:
list($width, $height, $type, $attr) = getimagesize(getChosenPhoto($_GET['id']));
echo $width;
basically, all I want to do is grab various info like height or width from an image I have stored in a database.
if I use the code raw like this:
list($width, $height, $type, $attr) = getimagesize("images/fullsized/bob.jpg");
echo $width;
then it spits out the width. But, if I use it the above way it seems to just spit out this:
"images/fullsized/bob.jpg"
even if I put the get code into a string like this and feed it back through:
$hubbub = getChosenPhoto($_GET['id']);
list($width, $height, $type, $attr) = getimagesize($hubbub);
echo $width;
Still....nothing happens.
can't figure this out for thee life of me. Anybody have any solutions?
thanks so much for the help,
-Bayard
list($width, $height, $type, $attr) = getimagesize(getChosenPhoto($_GET['id']));
echo $width;
basically, all I want to do is grab various info like height or width from an image I have stored in a database.
if I use the code raw like this:
list($width, $height, $type, $attr) = getimagesize("images/fullsized/bob.jpg");
echo $width;
then it spits out the width. But, if I use it the above way it seems to just spit out this:
"images/fullsized/bob.jpg"
even if I put the get code into a string like this and feed it back through:
$hubbub = getChosenPhoto($_GET['id']);
list($width, $height, $type, $attr) = getimagesize($hubbub);
echo $width;
Still....nothing happens.
can't figure this out for thee life of me. Anybody have any solutions?
thanks so much for the help,
-Bayard