Home >Backend Development >PHP Tutorial > 小弟我为何获取不到表单的信息呢?哦

小弟我为何获取不到表单的信息呢?哦

WBOY
WBOYOriginal
2016-06-13 13:51:011034browse

高手指点我为何获取不到表单的信息呢?在线等哦
if($submit=="提交"){
$username=$_post[username];
$password=$_post[password];
}
?>



管理员:

密 码:










echo "管理员:$username"
?>
echo "密 码:$password"
?>

------解决方案--------------------
PHP code


<?php $submit=$_POST['submit'];

if($submit=="提交"){ 

$username=$_POST['username']; 
$password=$_POST['password']; 


<br /> 
<br> 
<br>  
echo "管理员:$username" ; //注意后面的分号
<br> 
<br> 
<br>
echo "密 码:$password" ;
}
?> 


管理员:
密 码:
Statement:
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