PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
This is a image resizing page. It allows users to upload images and then when images are displayed they are resized into a thumbnail. The function imageResize returns width and height.
"Action2" is called and should then call imageResize further into the function to get the new height and width yet it does not. I downloaded a debugger and have check my syntax and am just not able to figure out why it rolls over the function call ([color=red]no longer highlighted in red below[/color]).
Any help would be very much appreciated.
Thanks.
Charlie
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Sorry about not using the php tags, will do in the future
Thanks for the help. Now when I run this code it goes into the imageResize function but the image does not change size. The function seems to work fine and it returns the new width and height but does not affect the picture size. Am I going about this the wrong way? Should the return change the size of the picture?
Thanks again for any help
feyd wrote:imageResize() returns a string. Your code would expect it to echo.
Thanks feyd.
I messed around for way too long trying to echo it into the <img src> tag and was not successful so I took a different approach. I am passing the name of the file to my imageResize function and echoing the img tag from this method also. The problem now is that all of my pictures are the size of a period...? I changed my target size to 15000 and the size of the image did not change. I echoed the width and height that the images should be and they were equal to my target yet the pictures were still tiny.
Any help would be awesome, thanks.