my index file is
<body>
<form method="POST" action="post.php" >
<input name="name">
<input type="submit" value="submit">
</form>
</body>
and post.php is
<?php
$sec = 'qaswed';
if($sec == $_POST['name'])
{
echo "true";
}
else
{
echo "false";
}
?>
When I am simply writing the TRUE in place of $_POST['name'] in post.php file then irrespective of what i submit in index file,the result is true as obvious i.e
if($sec == TRUE) { echo "true"; } else { echo "false"; }//true
But, When in index file if i send TRUE in the name parameter then why the output is coming false .. i.e
if($sec == $_POST['name']) { echo "true"; } else { echo "false"; }// false when name=TRUE
when I send this from other page variable (request) then it evaluates to false.why it happens?