首页 > 解决方案 > 从表中访问用户配置文件

问题描述

我制作了一个表格来显示数据库中的所有患者,当我们单击“nom 患者”时,我希望重定向到所选患者的个人资料,以便尝试将带有 url 的“nom 患者”发送到 profile.php 页面

if($total_row > 0)
 {
foreach($result as $row)
{
    $r=$row["NomPatient"];
    $output .= '
    <tr>
        <td width="40%">'.$row["Username_Titeur"].'</td>
        <td width="40%">'.$row["PrenomPatient"].'</td>

         <td width="40%"><a href=" profile.php?link='. $r.'" >'.$r.'</a></td>



    </tr>
    ';
    }
   }

配置文件.php

<?php 
        include('../../database_connection.php');
        if ($_GET['link']==$r)
           {
         echo "Link 1 Clicked";
           } else {
            echo "Link 2 Clicked";
             }

但它没有任何帮助

标签: phpmysqldatabaseurlprofile

解决方案


推荐阅读