Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

image resize and calling from a function

Status
Not open for further replies.

DaRNCaT

Technical User
Dec 18, 2002
566
NZ
Hi, I have a function in which this is part of it.

foreach ($jewellery_array as $row)
{
$url = 'show_jewellery.php?jewelid='.($row['jewelid']);
echo '<tr><td>';
if (@file_exists('images/'.$row['jewelid'].'.jpg'))
{
$title = '<img src=\'resize_images_php?images/'.($row['jewelid']).'.jpg\' border=0>';
do_html_url($url, $title);
}

the resize_images.php page just holds a function to size down an image to fit.
My problem is, that the function works fine when called from the show cart page, but it dosen't work when called from the main page, intead I get
as the file path. But from the show cart page I get which is what I should be getting. Does anyone know how to fix this? I'm totally lost- I'm working hashing several scripts together to get what I want working, and I'm not sure I've put it together right. Sometimes, when my code just won't behave, I take it outside and make it listen to britney spears music, and when it comes back it's really well behaved. I wonder if it's suffering from post tramatic stress syndrome now..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top