X10nD
X10nD

Reputation: 22030

Unable to echo password

<?php
    echo $_POST['$P']."<BR>";       

?>


    <form method="post" action="">
    <input type="password" name="p">
    <input type="submit">
    </form>

I am unable to echo the password. Not looking forward to security features etc., Just want to know what exactly is wrong in this simple code

Upvotes: 0

Views: 1711

Answers (2)

mustafa
mustafa

Reputation: 745

Try this please

<?php
echo $_POST['p']."<BR>";       
?>


<form method="post" action="DONT_FORGET_URL.php">
<input type="password" name="p" value="">
<input type="submit">
</form>

Upvotes: 0

Naltharial
Naltharial

Reputation: 2152

It's

echo $_POST['p']."<BR>";

probably. Do a

var_dump($_POST);

and you'll see what the names are.

Upvotes: 5

Related Questions