Home > Backend Development > PHP Tutorial > 在if里面怎么获取不到get传过来的o_id,=".$o_id有误吗?求大神

在if里面怎么获取不到get传过来的o_id,=".$o_id有误吗?求大神

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-23 13:34:31
Original
807 people have browsed it


回复讨论(解决方案)

$_GET[ 'o_id ']


$_GET[ 'o_id ']

还是获取不到啊

那你 url 总得有 o_id=??? 这样的表述吧?
在你给出的少得可怜的资料中,我怎么也找不到

那你 url 总得有 o_id=??? 这样的表述吧?
在你给出的少得可怜的资料中,我怎么也找不到


">


那你 url 总得有 o_id=??? 这样的表述吧?
在你给出的少得可怜的资料中,我怎么也找不到


">
跟URL无关,o_id已经传过来了,我输出看过了。就是在if里面获取不到这个o_id

你在 if 里处理的是表单提交
而 o_id 是通过点击链接传递的
根本就是两回事!

你在 if 里处理的是表单提交
而 o_id 是通过点击链接传递的
根本就是两回事!

对哦,那要怎么做才能取到值

">

表单提交时用POST,你用$_GET当然获取不到。

">
 内加一句
">

然后获取那个地方改为:
$o_id = $_REQUEST['o_id'];

取值他们说了,你的语句还是要多注意下安全性:
$o_id = (int)$_REQUEST['o_id'];
"oid='{$oid}'"

已解决,谢谢大家

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template