We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,442 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

post field

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' />
        ...
2
Contributors
2
Replies
1 Hour
Discussion Span
5 Months Ago
Last Updated
3
Views
Question
Answered
hwoarang69
Posting Pro
569 posts since Feb 2012
Reputation Points: 6
Solved Threads: 0
Skill Endorsements: 7

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

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

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

GliderPilot
Posting Whiz in Training
239 posts since Sep 2006
Reputation Points: 34
Solved Threads: 42
Skill Endorsements: 12

ops embarrassing...

hwoarang69
Posting Pro
569 posts since Feb 2012
Reputation Points: 6
Solved Threads: 0
Skill Endorsements: 7
Question Answered as of 5 Months Ago by GliderPilot

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0730 seconds using 2.64MB