I have an image resizing script which uses GD. I'd like to incorporate this into my smarty template layout, but it's causing problems. In a normal page, I'd just do something like:

<IMG SRC="resize_image.php?image=$story[picture]">

And that's been working on normal PHP pages where $story[picture] is a databased value like "pictures/424.jpg".

So now that I'm using a smarty template, if I want to run the resize_image.php script I have to bracket it -

{php}
resize_image.php
{/php}

like that...

The problem is that I need to be able to feed resize_image.php a value from the database so it knows what picture to resize. I've tried all sorts of stuff including sending "{php}resize_image.php{/php}" to the template as one big value. The way it compiles it just doesn't seem to work.

In the simplest terms, the problem here is with a script which must be included into a template and fed by dynamic data. Anyone know how to go about this?

thanks.

ian