Start New Discussion within our Web Development Community

echo"$u2" seem to be working right. but nothing prints for echo"$p2". i tryed raping $_POST['p'] in isset() function but didnt seem to be working.

<?php
    if(isset($_POST['b'])) 
    {
      $u2 = $_POST['u'];
      $p2 = $_POST['p'];

      echo"$u2";
      echo"$p2";
    }  
?>


<div>
    <form action ='login.php' method = 'POST'>
         <div>
             <p>
                 <input type ="text" name='u' />
             </p>
        </div>

        <div>
            <p>
                <input type ="password" name'p' />
           </p>
        </div>
        ...
        <input type ="submit" name='b' />
        ...

You're missing the = in your password field name property.

You have:
<input type ="password" name'p' />

Should be:
<input type ="password" name='p' />

This question has already been answered. Start a new discussion instead.