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' />
        ...

Recommended Answers

All 2 Replies

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

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

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

ops embarrassing...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.