Forum Moderators: coopster

Message Too Old, No Replies

image is not displaying.please help

         

Flolondon

12:24 pm on Mar 26, 2006 (gmt 0)

10+ Year Member



echo " <td width=\"259\" rowspan=\"4\">&nbsp;</td>\n";
echo " <td width=\"414\" rowspan=\"4\"><img src=\"file:///C¦/XamppServer/xampp/htdocs/car.jpg" width="75" height="76"</td> \n"
echo " <td width=\"13\">&nbsp;</td>\n";

thats the error I get.
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in C:\XamppServer\xampp\htdocs\cars\garage.php on line 80

please help

henry0

12:41 pm on Mar 26, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You need to escape your double quotes
Example
<a href="aaaa.jpg">;
Becomes
<a href=\"aaa.jpg\">;
Same with: <width="100">
Becomes
<width=\"100\"> etc...

<edit>
Also:
C¦/XamppServer/xampp/htdocs/car.jpg
you should try to enter a relative path
like:
car.jpg instead of starting by C:
in addition try avoiding stocking tons of unorganized items directly at your htdocs root
htdocs is similar to /var/www/html/car.jpg
on a production server

so put your img in a directory created at htdocs root
ex: my_test/img/car.jpg
and your URL will be
<a href=\"my_test/img/car.jpg\">;

[edited by: henry0 at 1:00 pm (utc) on Mar. 26, 2006]

Flolondon

12:47 pm on Mar 26, 2006 (gmt 0)

10+ Year Member



thanks