$ _POST值已设置,但即使您输入了某些内容,也始终为null [英] $_POST value is set but always = null even if you enter something
问题描述
[PHP]
其他:< input name =" school_type_other"大小= QUOT; 30英寸; maxlength =" 75"
value ="<?php
if($ _POST [''hasReviewedApplicant''])echo $ _POST [ ''school_type_other''];
else echo str_replace(''"'',''& quot;'',str_replace(''\\'',''''' ,
$ result [0] - > school_type_other));
?>">
[/ PHP]
我通过var_dump()和print_r()验证了
$ _POST [''hasReviewedApplicant''] = 1和$ _POST [ ''school_type_other'']
= null,即使你在文本字段中输入内容,它仍然是
null!
有人能告诉我这次我做错了什么吗?我迷路了!
Thanx
菲尔
[PHP]
Other: <input name="school_type_other" size="30" maxlength="75"
value="<?php
if ($_POST[''hasReviewedApplicant'']) echo $_POST[''school_type_other''];
else echo str_replace(''"'', ''"'', str_replace(''\\'', '''',
$result[0]->school_type_other));
?>">
[/PHP]
I verified via both var_dump() and print_r() that
$_POST[''hasReviewedApplicant''] = 1 and that $_POST[''school_type_other'']
= null, even when you enter something into the text field, it''s still
null!
Can someone tell me what on earth I did wrong this time? I''m lost here!
Thanx
Phil
推荐答案
_POST [''hasReviewedApplicant''])echo
_POST[''hasReviewedApplicant'']) echo
_POST [''school_type_other''];
else echo str_replace(''" '',''& quot;'',str_replace(''\\'','''',
_POST[''school_type_other''];
else echo str_replace(''"'', ''"'', str_replace(''\\'', '''',
result [0] - > school_type_other));
?>">
[/ PHP]
我通过验证通过
result[0]->school_type_other));
?>">
[/PHP]
I verified via both var_dump() and print_r() that
这篇关于$ _POST值已设置,但即使您输入了某些内容,也始终为null的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!