dongni3854 2014-06-26 05:37
浏览 35

来自PHP的数据的链接引用

I have create the list can show all the account.

Here is the php,i have show all the login account name.and how to get a href to their only file .

example i get the account name call "admin",and then show on table .now i need to create a link on "admin" this word.so when i kick "admin" , i can see his profile in a new page. and how to do it ?

(((((echo all account 's php)))))

$con1 = mysql_connect("127.0.0.1","root","password");

  mysql_select_db("babytradeapps");

  $sql1 = "Select LoginID , Permission
          from loginacc where Permission = 2 ";


  $results = mysql_query($sql1,$con1);

  echo "<table border=5 cellpadding=10>";

  echo "<tr><th>members</th></tr>";

  while($row = mysql_fetch_array($results)) { 

    echo "<td>$row[0]</td>";

  }

  echo "</table>";
  • 写回答

2条回答 默认 最新

  • dongyi3776 2014-06-26 05:40
    关注

    Put the link in your echo statement:

    echo "<td><a href='profile.php?id={$row['LoginID']}'>$row['LoginID']}</a></td>;
    
    评论

报告相同问题?

悬赏问题

  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程
  • ¥30 Eclipse官网打不开,官网首页进不去,显示无法访问此页面,求解决方法
  • ¥15 关于smbclient 库的使用