I've downloaded a free imageresizer script. All i really need to do is use the following code to active it: <?php include("ImageEditor.php"); $imageEditor = new ImageEditor("imagename.jpg", "imagelocation"); $imageEditor->resize(x, y); $imageEditor->outputImage(); ?> Now, i want to link to this script with text from a html file. Like when you click: "Resize to 50x50" it'll start the script. However, i want the php script to get the image name from the html file, to avoid creating multiple php scripts. Since i will be having alot of pictures placed in different locations that will need the resize option. Also, if you have a smarter way of doing this, please let me know...
okay do it like <?php $image=$_REQUEST['image']; include("ImageEditor.php"); $imageEditor = new ImageEditor($image, "imagelocation"); $imageEditor->resize(x, y); $imageEditor->outputImage(); ?> Now say the script name is resize.php You can access it from resize.php?image=xxx.jpg the xxx.jpg will be retrieved and stored in the $image variable and passed on to the function. In the HTML, below the image you can link the same way to resize.php?image=filename.jpg aditya
<a href=page.php?id=clicked>Resize to 50x50</a> PHP: on the same page at the top put this code <?php if(isset($_GET['id'])) { Paste your imageeditor code here. } ?> PHP: