PDA

View Full Version : when i mouseover on the images the table cells are disturbed


swetha123
12-01-2008, 01:44 PM
hello,

please help me out with this problem

I get the images from my database and when the user mouseover on it the images should Zoom In (increase) but not the table cells

but here the table cells are disturbed
please tell what wrong am i doing
<html>
<head>
</head>

<?php
function connect()
{
$dbhost='aa';
$dbuser='aaa';
$dbpass='aaaa';
$conn= mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql'.mysql_error());
$dbname='aaaaa';
mysql_select_db($dbname);
return $conn;
}
?>

<body bgcolor="#0a1936" >

<?php
$c=connect();
$page_name="spry_styles.php";
$start=$_GET['start'];
if(!($start>0))
{
$start=0;
}
$eu=($start-0);
$limit=9;
$this1=$eu+$limit; //6
$back=$eu-$limit; //-6
$next=$eu+$limit; //6
$query2="select style from styles";
$sql=mysql_query($query2);
$result2=mysql_num_rows($sql); //25
$query="select path from styles limit $eu,$limit"; //0 to 6
$result=mysql_query($query);
echo '<table border="1" align="center" width="55%" height="60%" BORDERCOLOR="#C6C6C6" >';
for($r=1;$r<=3;$r++)
{
echo '<tr>';
for($d=1;$d<=3;$d++)
{
$obj=mysql_fetch_object($result);
$imageSrc=$obj->path;
$cimage="/images/".$obj->path;
echo '<td border="1" width="15px" height="25px" id="img1" name="img1">
<img width="170px" height="100px" onmouseover="this.style.width=200;this.style.height=150"
onmouseout="this.style.width=170;this.style.height=100" src="' . $cimage . '"/></td>';
}
echo '</tr>';
}
echo'</table>';

echo '<table align ="center" width="50%"><tr><td align="center">';
$nume=$result2;
if($nume > $limit ) // 25>9 y
{
echo "<table align ='center' width='100%'><tr><td align='left' width='5%'>";
if($back >=0) //
{
print "<a href='$page_name?start=$back&uname=$cuser'><font face='Verdana' size='2'>PREV</font></a>";
}
echo "</td><td width='10%'>";
$i=0;
$l=1;
for($i=0;$i < $nume;$i=$i+$limit)
{
if($i <> $eu)
{
echo "<a href='$page_name?start=$i&uname=$cuser'><font face='Verdana' size='2'>$l </font></a>";
}
else
{
echo "<font face='Verdana' size='2' color=red>$l </font>";
}
$l=$l+1;
}
echo "</td><td align='right' width='5%'>";
if($this1 < $nume)
{
print "<a href='$page_name?start=$next&uname=$cuser'><font face='Verdana' size='2'>NEXT</font></a>";
}
echo "</td></tr></table>";
}
echo '</tr></td></table>';
?>
</body>
</html>

thanks in advance