getimagesize() help needed

A

Anonymous

Guest
yes, i did... and i actually got everything to work pretty good so far! :rolleyes:

I just have a question about getimagesize...

how can i do something like the following:

Code:
  $imagesize = getimagesize($_FILES['image']['tmp_name']);
    $imagewidth = $size[0];
    $imageheight = $size[1];


	$sql = "INSERT INTO $currentTable ( `picId` , `filaName` , `picTitle` , `picCaption` , `picWidth` , `picHeight` , `dateAdded` ) VALUES ('', '".$_FILES['image']['name']."', '".$_POST['picTitle']."', '".$_POST['picCaption']."', '".$_POST['$imagewidth']."', '".$_POST['$imageheight']."', '".dateForQuery($_POST['year'], $_POST['month'], $_POST['day'])."')"; 
	queryResults($sql);

What i'm wanting to do is upload a picture, take that image , get it's width & height (with getimagesize) and then have each element its own variable.

Once i get the image width & height into variables

Code:
    $imagewidth = $size[0];
    $imageheight = $size[1];

How can i insert those values into my sql query? (this is what i'm trying now) code snippet:

Code:
".$_POST['picCaption']."', '".$_POST['$imagewidth']."', '".$_POST['$imageheight']."',


Thank you,
Danno~
 
It would be more like this:

Code:
".$_POST['picCaption']."', '" . $imagewidth . "', '" . $imageheight . "',
 
Back
Top