I've since tried that also.  It too seems to return the same error.  I'm
curious if the file_exists can't use relative positions....like it has to be
in the same folder or you have to use the whole line like c:\....  I'm
working on a box that isn't mine of the net...if that's the case I don't
know my full directory line.  Just a thought but I'm not sure.  I'll include
my full code below...as it sits now.  Maybe you can see something that I
can't.....

-----

<?php

//connect to DB

include ('connect.php');

//Query MySQL DB

$result = mysql_query("SELECT * FROM ar
   LEFT JOIN company on ar.company_id=company.company_id
   LEFT JOIN scale on ar.scale_id=scale.scale_id
   WHERE stock_status = 0
   order by ar.driver_number");


//gather results

if ($myrow = mysql_fetch_array($result)) {

//start table

  echo "<table border=1>\n";

  echo "<tr><td>Image</td><td>Info</td></tr>\n";

  do {

 //filename is the item number + t.jpg -- t shorthand for thumbnail

   $picname = "$itemnumber t.jpg";

     print ("<tr><td><center>");

 //if the file exists then print it.  Otherwise print a generic image saying
it doesn't exist.

 if (file_exists ("/images/$picname t.jpt")
 {
  print ('<img src=\"/images/ . $picname . t.jpt\">');
  print ("<center></td><td><center><a href=\"drivers.php?driver=$dn\"> $dn
</a><br> $sp - $val <br> $size : \$$price<br>Release: $release <br> <a
href=\"cart.php?item=$itemnumber\">Preorder This
Item</a></center></td></tr>\n");
 }
 else
 {
  print ("<img src=\"/images/npat.jpt\">");
  print ("<center></td><td><center><a href=\"drivers.php?driver=$dn\"> $dn
</a><br> $sp - $val <br> $size : \$$price<br>Release: $release <br> <a
href=\"cart.php?item=$itemnumber\">Preorder This
Item</a></center></td></tr>\n");

 }


  }
  while ($myrow = mysql_fetch_array($result));

  print ("</table>\n)";

  //if no results found display this message
}
else
{

  echo "Sorry, no records were found!";

}

$dn = "$myrow["driver_name"]";
$sp = "$myrow["sponsor"]";
$val = "$myrow["value"]";
$size = "$myrow["size"]";
$price = "$myrow["price"]";
$release = "$myrow["release"]";
$itemnumber = "$myrow[item_number]";
?>

-----

maybe that will help.

-Jordan

"Faeton" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello Prolog,
>
>
> Hm... And what about:
> print '<img src="/images/$filename">';
> instead of readfile?
>
>
> P>  if(file_exists(/images/$filename))
> P>  {
> P>   readfile(/images/$filename);
> P>  }
> P>  else
> P>  {
> P>   readfile(images/npat.jpg);
> P>  }
>
>
>
> ------------------------------------------------
> Ivan 'Faeton aka xetrix' Danishevsky
> ICQ(240266) [EMAIL PROTECTED] www.xemichat.com
> ::: Стоит только заострить вопрос, как сразу просят закругляться. :::
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to