Hello Im just a beginner in this php world.

I designed a "login" page that passes the $username and $password to the "loginprocess" page. Under normal circumstances of entering correct password the code works fine and a comfortable login occurs..

The doubt is that, in the event of an information mismatch, the "loginprocess" sends back a $msg value of 1 via the header to the "login" page to alert the user.
header("location:login.php?msg=1");


Hence in the login page I placed the following code

<?php
$m=$_GET["msg"];
if($m==1)
echo "username or password incorrect";
?>


The big problem that happens here is that : when i just simply open the "login" page.. before even entering username and password, this error is already displayed as such

Notice: Undefined index: msg in C:\wamp\www\bca\login.php on line 45

Help help