So i'm uploading images and inserting image name and image location to MySQL database...
I looking for ways to read the image's WIDTH and inserting that number into another field on the database
how do i do this?
currently i'm using $_FILES['image'] to read its name and the form uses the POST method. I tried using imagesx(), but it doesn't work.
any help???
?width?With this form I upload image to dir & put data t
Moderator: General Moderators
-
danselstudios
- Forum Newbie
- Posts: 24
- Joined: Sat Jun 03, 2006 10:47 am
- Location: Corona, CA
-
danselstudios
- Forum Newbie
- Posts: 24
- Joined: Sat Jun 03, 2006 10:47 am
- Location: Corona, CA
yeah I sure do have GD...version 24 to be exact...
thanks for that gd_info() function...neeto.
Warning: imagesx(): supplied argument is not a valid Image resource in c:..\cpanel\ns_gallery_config.php on line 81
$image_width = imagesx($_FILES['img_file']); <---this is the supplied argument...whats wrong with this????
thanks for that gd_info() function...neeto.
Warning: imagesx(): supplied argument is not a valid Image resource in c:..\cpanel\ns_gallery_config.php on line 81
$image_width = imagesx($_FILES['img_file']); <---this is the supplied argument...whats wrong with this????
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
That's an array. imagesx() specifically says the argument is to be a resource.
I believe you may want to use getimagesize() instead. .. and it'd be $_FILES['img_file']['tmp_name'].
I believe you may want to use getimagesize() instead. .. and it'd be $_FILES['img_file']['tmp_name'].