PDA

View Full Version : كمك در تركيب PHP با اچ تي ام ال هي خطا ميده



farshidtm
جمعه 25 تیر 1389, 22:35 عصر
سلام دوستان من مي دونم سوالم خيلي مسخره هست ولي كمك كنيد از صبح تا حالا هرچي ميزنم درست نميشه


<?php
$q=mysql_query("select `download`,`title`,`pictures` from news order by id desc limit 0,8");
while($row=mysql_fetch_array($q)){
// ("<center><img width=\"85\" height=\"120\" src=" .$row['pictures'] ."></center>");
// "<a href=".$row['download'].">".$row['title']."</a>";
// ("<center><img width=\"85\" height=\"120\" src=images/" .$show['pictures'] ."></center>");


اون بالا مي دونم گند زدم مي خوام اين متغير ه رو بزارم جاي اين


<a target="_blank" href="متغير دانلود"><img border="0" src="متغير عكس" alt="متفير تايتل"></a>&nbsp;

صابر طهماسبی
جمعه 25 تیر 1389, 22:59 عصر
کد اصلاح شده :




<?php
$q=mysql_query("select `download`,`title`,`pictures` from news order by id desc limit 0,8");
while($row=mysql_fetch_array($q)){
echo '<center><img width="85" height="120" src="' .$row['pictures'] .'"/></center>';
echo '<a href="'.$row['download'].'">'.$row['title'].'</a>';
echo '<center><img width="85" height="120" src=images/"'.$row['pictures'] .'"/></center>';
}
?>


این هم کد دوم :




echo '<a target="_blank" href="'.$row['download'].'"><img border="0" src="'.$row['pictures'].'" alt="'.$row['title'].'"></a>';

farshidtm
شنبه 26 تیر 1389, 05:22 صبح
دست شما درد نكنه آقا صابر :-x