Need some help with PHP

Asked By 0 points N/A Posted on -

please read the code below,

<form action="login.php?mode=login" method="post" >
Username: <input type="text" name="username"><br />
Password: <input type="password" name="password"><br />
<input type="submit" value="login" name="login">

my requirement is display  user name and password in the top of  “login.php” , can someone please provide PHP code

Answered By 0 points N/A #93995

Need some help with PHP


For this case you got to make a login page as where the action is going to take place login.php and put the following code inside that page and link the database as required .(Remember this is a standard code and if you are a php programmer then you must atleast know the basics.)


$sql="SELECT * FROM user_info WHERE user_name='$name'and password='$password'";

    echo "Wrong Username or Password";



and you need to change the header with your desired page.php so that you can get the username..


Hope this helps

P.S. If you get any problem then free to ask

Login/Register to Answer

Related Questions