代码错误,似乎找不到问题
我目前正在建立一个网站,我向注册的用户发送激活电子邮件。 当他们点击电子邮件时,它会使用如下 URL 重定向他们: webpagehere?Key=123456789
现在我想从键中获取值,但我无法以某种方式检索它。 目前我正在使用:
if( isset( $_GET['Key'] )) {
$SCode = $_GET['Key'];
}
并且我想使用我的查询将 $SCode 输入到我的数据库中。
我似乎没有在 $SCode 中获得任何值
唯一的问题是,在我填写信息并提交表单后,
,我收到通知:未定义的索引:在线 C:\wamp\www\productie\verify.php 中的引用 第10
行 10 是代码
有人愿意帮助我吗?
编辑:我将提交注册表单后加载的所有执行代码放入pastebin.com http://pastebin.com/6Sdje0V9
i'm currently setting up a website, where i send the users that register an activation email.
when they click the email it'll redirect them with an URL like: webpagehere?Key=123456789
now i want to get the value from key, but i can't retrieve it somehow.
currently im using:
if( isset( $_GET['Key'] )) {
$SCode = $_GET['Key'];
}
and i want to input $SCode into my database using my querys.
the only problem is, i dont seem to get any value into $SCode
after i fill in the info, and submit my form, i get
Notice: Undefined index: Ref in C:\wamp\www\productie\verify.php on line 10
on line 10 is the code
anybody care to help me out?
edit: i put all my execute code that loads after submitting the register form into pastebin.com
http://pastebin.com/6Sdje0V9
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您是否尝试访问以下位置的值(假设该变量实际上名为 key,如果没有将其替换为您所称的值):
在旧版本的 PHP 中,有一个名为 register_globals 的东西,它允许您直接访问 < 处的变量code>$key,但这是一个疯狂的安全漏洞,所以现在(谢天谢地)默认禁用它,所以你必须使用
$_GET
处的数组...Did you try to access the value at (assuming the variable is actually named key, if not replace it with what you called it):
In older versions of PHP there was something called register_globals which would have allowed you to access the variable right at
$key
, but it was an insane security hole so it's now (thank goodness) disabled by default, so you'll have to use the array at$_GET
...将会有你所寻求的价值。
Will have the value you seek.
哎哎哎。
你的错误信息
您的代码应该是
Ref != ref
难道没有人已经在他们的评论之一中提到了区分大小写吗?
ay ay ay.
your error message
your code should be
Ref != ref
didn't someone already bring up case sensitivity in one of their comments?