# Images in php

## Recommended Posts

Why doesn't this display the images in the table?

<table border=”0” cellpadding=”0” cellspacing=”0” width=”750”>
<tr>
<td align=”left” valign=”top”><img src=”images/site-template-sick-green_01” border=”0”></td>
<td align=”left” valign=”top”><img src=”images/site-template-sick-green_02” border=”0”></td>
<td align=”left” valign=”top”><img src=”images/site-template-sick-green_03” border=”0”></td>
</tr>
<tr>
<td align=left” valign=”top”><img src=”images/site-template-sick-green_04” border=”0”></td>
<td align=”left” valign=”top”>GAME GOES HERE</td>
<td align=left” valign=”top”><img src=”images/site-template-sick-green_06” border=”0”></td>
</tr>
<tr>
<td align=”left” valign=”top”><img src=”images/site-template-sick-green_21” border=”0”></td>
<td align=”left” valign=”top”><img src=”images/site-template-sick-green_22” border=”0”></td>
<td align=”left” valign=”top”><img src=”images/site-template-sick-green_23” border=”0”></td>
</tr>
</table>

##### Share on other sites

What happens when you view the image by itself?

##### Share on other sites

What does this have to do with PHP? It's looks like pure HTML to me.

Ken

##### Share on other sites

Wajjooo

Fast response time here

Wel it hase to do with PHP beceuse its index.php

Second i learned that code form a book called

PHP game programming

What happens when you view the image by itself?

When i view them with paint and stuff its just a normal image but when look on my site it gives to no image drawing you that little box with a broken page in it

##### Share on other sites

the best advice i can offer you is to forget slicing up images, and using tables for layouts.

learn XHTML and CSS before proceeding ANY further.

sorry to be blunt.

##### Share on other sites

This code is pure HTML, just because it's in a PHP file, doesn't make it PHP.

The problem is, most likely, that you aren't putting the file extension in the reference:

<td align="left" valign="top"><img src="images/site-template-sick-green_01.jpg" border="0"></td>


Ken

Damn Kenrbnsn.

##### Share on other sites

I chande names of images to more logic names and also added .gif behind all and now this is the new error

The error i added smileys where small boxes with the broken page sign is

<\td> <\td> <\td>  <\tr>

<\td> GAME GOES HERE <\td> <\td> <\tr>

<\td> <\td> <\td>  <\tr>  <\table>

The code

<html>
<body>

<tr>
<td align=”left” valign=”top”><img src=”images\left_top.gif” border=”0”><\td>
<td align=”left” valign=”top”><img src=”images\middel_top.gif” border=”0”><\td>
<td align=”left” valign=”top”><img src=”images\right_top.gif” border=”0”><\td>
<\tr>
<tr>
<td align=left” valign=”top”><img src=”images\left_center.gif” border=”0”><\td>
<td align=”left” valign=”top”>GAME GOES HERE<\td>
<td align=left” valign=”top”><img src=”images\right_center.gif” border=”0”><\td>
<\tr>
<tr>
<td align=”left” valign=”top”><img src=”images\left_down.gif” border=”0”><\td>
<td align=”left” valign=”top”><img src=”images\middel_downgif” border=”0”><\td>
<td align=”left” valign=”top”><img src=”images\right_down.gif” border=”0”><\td>
<\tr>
<\table>
</body>
</html>

##### Share on other sites

Since this has nothing to do with PHP, I'm moving it to the HTML section.

Ken

##### Share on other sites

Shouldn't your switches be the other way?

##### Share on other sites

You mean \ should be / thanks that was the problem

It fixed the <\td> part

but images still down't show

What should i do about the images?

##### Share on other sites

Try this:

<td align=”left” valign=”top”><img src=”images/left_top.gif” border=”0”></td>

Are you sure that picture extension is .gif ???

Change slash \ to / for the picture path!

##### Share on other sites

Check for typos in your code for the image filenames; make sure you type the correct extension (.gif, .jpg,...); verify the images are in the images folder.

##### Share on other sites

Ok the here is what the images are

-there not misspelled

-there are Graphics interchange format <--- i think thats GIF in short

-there in the same map as the index.php in a special image map <---- i also tried changing the code and image's with out the map but doesn't work

Maybe this help

##### Share on other sites

Ok. Try changing the quotes (from  ”  to  ") for one row of your table data, like

<html>
<body>
<tr>
<td align="left" valign="top"><img src="images\left_top.gif" border="0"><\td>


If you see the image for that table cell then the problem is probably the quotes.

##### Share on other sites

Ok. Try changing the quotes (from  ”  to  ") for one row of your table data, like

<html>
<body>
<tr>
<td align="left" valign="top"><img src="images\left_top.gif" border="0"><\td>


If you see the image for that table cell then the problem is probably the quotes.

How wouldi do that? how do you make those quotes?

##### Share on other sites

On my keyboard the key is immediately to the left of the enter key. I use the shift key in tandem with that key to produce a quotation mark.

##### Share on other sites

On my keyboard the key is immediately to the left of the enter key. I use the shift key in tandem with that key to produce a quotation mark.

Well when i use that it gives me these quotues """"

##### Share on other sites

Those quest are now set to """""

Still no result

DO i tried using a nother path with a http:\\www.somerandowsite.com/somerandomthingy/image.jpg

I tried something like that and it showed the img

##### Share on other sites

Try using this and watch your switches. Replace aaa.jpg with your image filename. It should work since it works for me. You will have to modify the height and width of the image to reduce distortion.

<table border=”0” cellpadding=”0” cellspacing=”0” width=”750”>
<tr>
<td align="left" valign="top"><img src="images/aaa.jpg" height="183" width="235"

border="0"></td>
<td align="left" valign="top"><img src="images/aaa.jpg" height="183" width="235"

border="0"></td>
<td align="left" valign="top"><img src="images/aaa.jpg" height="183" width="235"

border="0"></td>
</tr>
<tr>
<td align="left" valign="top"><img src="images/aaa.jpg" height="183" width="235"

border="0"></td>
<td align="left" valign="top">GAME GOES HERE</td>
<td align="left" valign="top"><img src="images/aaa.jpg" height="183" width="235"

border="0"></td>
</tr>
<tr>
<td align="left" valign="top"><img src="images/aaa.jpg" height="183" width="235"

border="0"></td>
<td align="left" valign="top"><img src="images/aaa.jpg" height="183" width="235"

border="0"></td>
<td align="left" valign="top"><img src="images/aaa.jpg" height="183" width="235"

border="0"></td>
</tr>
</table>

##### Share on other sites

I fixed the problem another way now but now there is a new problem i all the images work but it messed 2 of them up

You see one on the right and one on the left

You can see some sort of spacing

##### Share on other sites

I went to the site for one of the images (http://i179.photobucket.com/albums/w293/raymondje21/left_topgif.gif) and it matched what I saw on the main page. I viewed it in IE. What type of browser do you use?

i use Fire Fox

##### Share on other sites

I think the problem is because your images are different dimensions. The upper left image has a width="147" and height="183" and the upper right image has a width="142" and height="177". This is probably what is causing the spacing. Try fixing all images so the result is a square table.

##### Share on other sites
• 2 weeks later...

when you say "map" what do you mean?

were are the images in relation to index.php

if they are in the same directory then remove the images part of the src url

#### Archived

This topic is now archived and is closed to further replies.

×

• #### Activity

• Chat
×
• Create New...