Quantcast
Channel: Active questions tagged feedback+php - Stack Overflow
Viewing all articles
Browse latest Browse all 34

Displaying a Username or Password Feedback Message using PHP

$
0
0

I need to have messages show up when an invalid username or password is entered.

I have it set up so that when something happens, it redirects the page back to the index.php page, but with ?message=Bad_Username or ?message=Bad_Password added.

I also have an if statement set up so that I can get the message to print below the username or password fields when certain conditions are met.

I am just not certain what the If statement condition needs to be for it to work.

Here's the code.

if (($_GET['username'])){    echo "<p class='help is-danger'>This username is invalid</p>";    if(header("location: index.php?message=Bad_Username")){        echo "<p class='help is-danger'>This username is invalid</p>";    }}

Viewing all articles
Browse latest Browse all 34

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>