/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] Problem with OPERA AND IE 7 8

i have a site thats look fine with ie 6 and firefox
but not with ie7 and opera

this is the code of the php file

site link [url]http://fgs.co.il[/url]

[CODE]$sql = mysql_query(“SELECT * FROM ava_games WHERE published=1 ORDER BY id desc LIMIT 6″);
while($row = mysql_fetch_array($sql))
{
$abcd= $row[‘name’];
$abcd = str_replace (” “, “-“, $abcd);

if ($seo_on == 0)
{
$url = games.php?task=view&id=’.$row[‘id’].”;
}
else
{
$url = ‘view/’.$row[‘id’].’/’.$abcd.’.htm’;
}

echo ‘&nbsp;<a href=”‘.$site_url.’/’.$url.'”><img src=”‘.$row[‘image’].'” width=”100″ height=”75″ alt=”‘.$row[‘name’].'”></a>’;
}
?>[/CODE]

this code show the new games in the side bar ..

i want to add table code to this file ..
somethig like that:

<table width ……. >

echo ‘&nbsp;<a href=”‘.$site_url.’/’.$url.'”><img src=”‘.$row[‘image’].'” width=”100″ height=”75″ alt=”‘.$row[‘name’].'”></a>’;

</table>

firefox
[url]http://img136.imageshack.us/my.php?image=26414917.jpg[/url]

opera
[url]http://img136.imageshack.us/my.php?image=91489445.jpg[/url]

tnx

to post a comment
HTML

8 Comments(s)

Copy linkTweet thisAlerts:
@Jgy3183Mar 26.2009 — maybe its because you aren't encapsulating the <a>'s in cells in rows...

try:

[CODE]<table width ......>
<tr>
<td>
<a href........></a>
</td>
</tr>
</table>[/CODE]
Copy linkTweet thisAlerts:
@xxhunterxxauthorMar 26.2009 — allready tried ... doenst help

i need to echo <table> </table> only 1 time ...

sorty gor my bad english
Copy linkTweet thisAlerts:
@Jgy3183Mar 26.2009 — try this:

[CODE]echo '&nbsp;<tr><td><a href="'.$site_url.'/'.$url.'"><img src="'.$row['image'].'" width="100" height="75" alt="'.$row['name'].'"></a></td></tr>';[/CODE]
Copy linkTweet thisAlerts:
@xxhunterxxauthorMar 26.2009 — no didnt help

how can i echo something only 1 time

this is doing the same code 6 times

echo '&nbsp;<a href="'.$site_url.'/'.$url.'"><img src="'.$row['image'].'" width="100" height="75" alt="'.$row['name'].'"></a>';

i nned to echo befor it 1 time

and after 1 time
Copy linkTweet thisAlerts:
@Jgy3183Mar 27.2009 — well that echo statement has to repeat to get all the proper links in the database. but if you put the echo "<table>" and echo "</table>" outside the link, it should properly generate an HTML table with the links in their own rows. i'm going to copy your code, and put echo statements for the open and close table tags:

$sql = mysql_query("SELECT * FROM ava_games WHERE published=1 ORDER BY id desc LIMIT 6");

[B]echo '<table>';[/B]


while($row = mysql_fetch_array($sql))

{

$abcd= $row['name'];

$abcd = str_replace (" ", "-", $abcd);

if ($seo_on == 0)
{
$url = games.php?task=view&id='.$row['id'].'';
}
else
{
$url = 'view/'.$row['id'].'/'.$abcd.'.htm';
}
[B]echo '<tr><td>'; //need to have data in table cells if you want a table[/B]
echo '&nbsp;<a href="'.$site_url.'/'.$url.'"><img src="'.$row['image'].'" width="100" height="75" alt="'.$row['name'].'"></a>';
[B] echo '</td></tr>'; //now each link will be in its own row and cell in one big table[/B]
}
[B]echo '</table>';[/B]

?>
Copy linkTweet thisAlerts:
@xxhunterxxauthorMar 27.2009 — tnx

now the game images are 1 under the other

i want to put 2 images in the same line
Copy linkTweet thisAlerts:
@Jgy3183Mar 27.2009 — okie dokie..try using a counter like in the following code: (I apologize for any php syntax errors that might happen..dont have php parser at my disposal right now, so no real way to test:

[CODE]$sql = mysql_query("SELECT * FROM ava_games WHERE published=1 ORDER BY id desc LIMIT 6");
echo '<table>';

[B]$cellCounter=0; //Initialize cell counter variable[/B]


while($row = mysql_fetch_array($sql))
{
$abcd= $row['name'];
$abcd = str_replace (" ", "-", $abcd);

if ($seo_on == 0)
{
$url = games.php?task=view&id='.$row['id'].'';
}
else
{
$url = 'view/'.$row['id'].'/'.$abcd.'.htm';
}

[B]if($cellCounter==2)
{
echo '</tr>'; //Close the row
echo '<tr>'; //Open new row for next group of two cells

$cellCounter=0; //Re-set counter variable
}[/B]

[B]if($cellCounter==0)
{
echo '<tr>'; //First row for data
}[/B]

echo '<td>'; //need to have data in table cells if you want a table

echo '&nbsp;<a href="'.$site_url.'/'.$url.'"><img src="'.$row['image'].'" width="100" height="75" alt="'.$row['name'].'"></a>';

echo '</td>';
[B]$cellCounter=$cellCounter+1;[/B]

}
echo '</table>';[/CODE]
Copy linkTweet thisAlerts:
@xxhunterxxauthorMar 27.2009 — tnx tnx a lot work great
×

Success!

Help @xxhunterxx spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...