小编Xif*_*nie的帖子

if(!isset($ _ POST ["user"])被忽略并返回Undefined Index

当我输出这段代码时

23  if(!isset($_POST['user'])) {
24    $user = $_POST['user'];
25    $user2 = $user;
26    $pass[0] = $_POST['password'];
27    $pass[1] = $_POST['password2'];
28    $email[0] = $_POST['email'];
29    $email[1] = $_POST['email2'];
30    $agree = $_POST['agreed'];
31    $reprint['user'] = $user;
32    $reprint['password'] = $pass[0];
33    $reprint['email'] = $email[0];
34    $reprint['agree'] = $agree;
Run Code Online (Sandbox Code Playgroud)

它返回

Notice: Undefined index: user in C:\Program Files\EasyPHP-5.3.6.0\www\Arena\create_account.inc on line 24
Notice: Undefined index: password in C:\Program Files\EasyPHP-5.3.6.0\www\Arena\create_account.inc on line 26
Notice: Undefined index: password2 in C:\Program Files\EasyPHP-5.3.6.0\www\Arena\create_account.inc on line 27
Notice: …
Run Code Online (Sandbox Code Playgroud)

php post isset

2
推荐指数
1
解决办法
1万
查看次数

标签 统计

isset ×1

php ×1

post ×1