douwen5681 2018-04-07 00:21
浏览 16

无法在PHP中获取$ _GET值[关闭]

i am passing values inthe URL by the $_GET :

 <a href="http://localhost/myFiles/confirmation.php?`pseudo='.$pseudo.'&key'.$key.'">Confirmer votre compte</a>`

i get the values in the URL of the concerned page like this :

http://localhost/myFiles/confirmation.php?pseudo=test&key08656996298

but when i do this :

echo $_GET['pseudo'] ;
echo $_GET['key'];

it displays the 'pseudo' but not the key ! this is the error ( ! ) Notice: Undefined index: key in C:\wamp64\www\myFiles\confirmation.php on line 5

  • 写回答

2条回答 默认 最新

  • doq70020 2018-04-07 00:30
    关注

    Try this, understand that PHP is a server-side language.

     <a href="http://localhost/myFiles/confirmation.php?pseudo=<?php echo $pseudo;?>&key=<?php echo $key;?>">Confirmer votre compte</a>`
    
    评论

报告相同问题?

悬赏问题

  • ¥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 库的使用