dragoninasia2014 2014-12-22 12:23
浏览 7
已采纳

显示来自另一个php站点的数据

I am having trouble to display my bookISBN in another php site. Actually my first php page I have tabulated the data into a table form. And now I want to let the user to click on the book title and open a new php page where it shows the books details.

This is my first php page code:

echo "<table width = \"1000px\" border = \"1\" cellpadding = \"1\" cellspacing=\"1\">";
echo "<tr>";
echo "<th>".'Book ISBN'."</th>";;
echo "<th>".'Book Title'."</th>";
echo "<th>".'Book Year'."</th>";
echo "<th>".'Category ID'."</th>";
echo "<th>".'Category Description'."</th>";
echo "<th>".'Book Price'."</th>";
echo "<tr>";

if($booknum >= 1 ){
echo "<div style='margin: 0 0 10px 0; font-weight: bold;'>$booknum record(s) found!</div>";
while ($row = mysqli_fetch_assoc($bookrs)) {
    echo "<tr>";
    echo "<td><center>" . $row['bookISBN']."</center></td>";
    echo "<td><center><a href=\"bookdetails.php\">" .$row['bookTitle']. "</a></center></td>";
    echo "<td><center>" . $row['bookYear']."</center></td>";
    echo "<td><center>" . $row['catID']."</center></td>";
    echo "<td><center>" . $row['catDesc']."</center></td>";
    echo "<td><center>" . $row['bookPrice']."</center></td>";
    echo "</tr>";
}

Now I want to know how to retrieve the book ISBN number so that i can display in my second php page. I would be glad if someone can help me with it.

  • 写回答

3条回答 默认 最新

  • doushuo1989 2014-12-22 12:26
    关注

    echo "<td><center><a href=\"bookdetails.php?book=".$row['bookISBN']."\">" .$row['bookTitle']. "</a></center></td>";

    bookdetails.php you can access with $_REQUEST['book']

    Refrence site

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目
  • ¥20 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分
  • ¥15 delphi webbrowser组件网页下拉菜单自动选择问题