----- this is my image.php file---- for getting id----
-----imagefetcher.ph p------
Code:
<?php
include('connect.php');
if (isset($_GET['id']))
{
$gotten =mysql_query("select *from reg where id=".$_GET['id']);
while ($row = mysql_fetch_array($gotten))
{
echo $row['id'];
}
mysql_free_result($gotten);
}
?>
Code:
<html> <head> <title>home page</title> </head> <?php
include("connect.php");
$strSQL = "select * from reg";
$rsPix = mysql_query($strSQL);
$numRows = mysql_num_rows($rsPix);
$i = 0;
?> <table border="1"> <tr> <?php
while($i<$numRows)
{
?> <td> <img src="http://bytes.com/image.php?id=<?php echo mysql_result($rsPix,$i,"id"); ?>"/></a> </td> <?php
$i++;
if ($i%3==0)
{
?> </tr> <tr> <?php
}
?> <?php
}
?> <?php
if ($numRows%3>0)
{
?> <td "colspan="<?php echo $numRows%3; ?>">*</td> <?php
}
?> </tr> </table> </body> </html>
Comment