دوست عزیز لینک اولی که گذاشته بودید، ajax یا با جاوااسکریپت نبود من فکر کردم کاری که میخوای خیلی سخت باشه ولی این لینک اولی که من دیدم تقریبا ساده بوداگر نام عکسهات در بانک ذخیره شده در صفحه اول کوچیکشو نشون میدی و وقتی روش کلیک شدبا توجه به id که روش کلیک شده عکس بزرگ و متنشو تو یه صفحه دیگه مشون میده.
require("فایل ارتباط دهنده بانک");
$sq=mysql_query("select id,pic_name,latin_name from pic_tbl");
$path="product_img/";
$contor=1;
while($row=mysql_fetch_row($sq))
{
if($contor==1){
echo"<tr>";
}
$name=$row[1];
echo"<td width='150px' height='150px' align='center'>";
echo "<div style='width:100px;height:100px;'><a href='show.php?q=$row[0]' class='link1'><img src='".$path.$name."' width='100px' height='100px' align='absbottom'/></div><div style='width:100px;height:50px;text-align:center';>$row[2]</div></a>";
echo"</td>";
$contor++;
if($contor==5){
echo"</tr>";
$contor=1;
}
}
بعد تو یه صفحه دیگه اینجوری عکس بزرگو با مطلب مرتبطش نشون میدیم.
require("db.php");
$sq=mysql_query("select id,pic_name,latin_name,txt from pic_tbl where id=$_GET[q]");
$path="product_img/";
$contor=1;
while($row=mysql_fetch_row($sq))
{
$id=$row[0];
$name=$row[1];
if ($id==12){
echo "<div style='width:646px;height:350px;margin-left:auto;margin-right:auto;text-align:center;direction:rtl;'><table align=center><tr><td><img src='image/NEW-icon.jpg' align='left' /></td></tr><tr><td>$row[2]</td></tr><tr><td><img src='".$path.$name."' with='500px' height='300px' align='center'/></td></tr></table></div>";
echo "<div style='width:646px;min-height:50px;margin-left:auto;margin-right:auto;margin-top:15px;text-align:center;direction:rtl;'><p><b>$row[3]</b></p></div>";}
else {
echo "<div style='width:646px;height:350px;margin-left:auto;margin-right:auto;text-align:center;direction:rtl;'><table align=center><tr><td>$row[2]</td></tr><tr><td><img src='".$path.$name."' with='500px' height='300px' align='center'/></td></tr></table></div>";
echo "<div style='width:646px;min-height:50px;margin-left:auto;margin-right:auto;margin-top:15px;text-align:center;direction:rtl;'><p><b>$row[3]</b></p></div>";} }