download12749 2014-05-02 18:44
浏览 33
已采纳

如何传递到href中的不同信息

i am trying to output some information based on the edit in the code below :

echo "<td>".$rows['td']."<a href='edittd.php?edit=$rows[Nom_Matiere]'> edit <a></td>";

but the problem is that i want to output this information using 2 different information $rows[Nom_Matiere] and $rows[Number] how can i do that i tried those options :

1*

echo "<td>".$rows['td']."<a href='edittd.php?edit=$rows[Nom_Matiere] and $rows[Number]'> edit <a></td>";

2*

  echo "<td>".$rows['td']."<a href='edittd.php?edit=$rows[Nom_Matiere] && $rows[Number]'> edit <a></td>";

but they didn't work ,please is there suggestions how i can do that ,and the edittd.php:

echo mysql_error();
if(!empty($_SESSION['LoggedIn']) && !empty($_SESSION['Mail_Enseignant']))
{echo mysql_error();
$username = $_SESSION['Mail_Enseignant'];      
    echo mysql_error();
//query the database
if(isset($_GET['edit'])){
        $Nom_Matiere = $_GET['edit'];
            $Number = $_GET['edit'];
        $res = mysql_query("select Nom_Etudiant,Numero from etudiant,groupe,matiere where matiere.`Nom_Matiere`= '".$Nom_Matiere."' and groupe.`Number`= '".$Number."' and matiere.`Id_Specialite`=groupe.`Id_Specialite`")or die($myQuery."<br/> <br/>".mysql_error());
while($rows = mysql_fetch_array($res)):

    echo "<tr class='light'>";
    echo "<td>".$rows['Nom_Etudiant']."</td>";  
    echo "<td>".$rows['Numero']."</td>";        
endwhile;}
            ?>
  • 写回答

2条回答 默认 最新

  • duanjiancong4860 2014-05-02 18:46
    关注

    You need a parameter for the second value there.

     echo "<td>{$rows['td']}<a href='edittd.php?edit={$rows['Nom_Matiere']}&number={$rows['Number']}'> edit <a></td>";
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度