“<a>&#39; link is not able to include in table column field?</a>

时间:2014-01-18 10:43:38

标签: php html mysql

$query="SELECT A.train_no AS AA, A.station_id AS AB, A.arrival AS AC, A.dept AS AD, B.station_id AS AE, B.arrival AS AF, B.dept AS AG FROM TIME AS A,TIME AS B WHERE A.train_no = B.train_no AND A.station_id ='$f' AND B.station_id ='$t'";

$rs=mysql_query($query);


while($row = mysql_fetch_array($rs)) 

{

echo "<tr><td>".$row['AA']."</td> <td>".$row['AB']."</td> <td>" .$row['AC'] ."</td> <td>".$row['AD'] . "</td><td>".$row['AE'] . 
"</td><td>".$row['AF'] . "</td><td>" .$row['AG']. "</td><td>"<a href='Reservation.php'>Click Me</a>"<tr><td>";

}

1 个答案:

答案 0 :(得分:1)

像这样重写你的echo语句。 [你忘了关闭双引号]

echo "<tr><td>".$row['AA']."</td> <td>".$row['AB']."</td> <td>" .$row['AC'] ."</td> <td>".$row['AD'] . "</td><td>".$row['AE'] .
    "</td><td>".$row['AF'] . "</td><td>" .$row['AG']. "</td><td>"."<a href='Reservation.php'>Click Me</a><tr><td>";
                                                            //----^ You forgot here.