<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> D:\workspace\php\hellophp\mantis_post\post_test.html </title>
<meta charset="UTF-8">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>
<body>
<form method="post" action="check_test.php">
<input type="text" name="bug_monitor_username">
<input type="submit">
</form>
</body>
</html>
<?php
//D:\workspace\php\hellophp\mantis_post\check_test.php
$f_usernames = null;
if(isset($_POST['bug_monitor_username'])){
$f_usernames = trim( $_POST['bug_monitor_username'] );
}else{
echo "no post bug_monitor_username <br>";
}
if(!empty($f_usernames)){
echo "not empty f_usernames: $f_usernames<br>";
$add_bug_monitors=true;
}else{
//$add_bug_monitors=false;
echo "empty f_usernames <br>";
}
if(isset($add_bug_monitors) ){ // && ($add_bug_monitors === true)
echo "isset add_bug_monitors: $add_bug_monitors <br>";
}else{
echo "not set add_bug_monitors. <br>";
}
/*
jim
not empty f_usernames: jim
isset add_bug_monitors: 1
[ ]
empty f_usernames
not set add_bug_monitors.
[]
empty f_usernames
not set add_bug_monitors.
*/
?>