Jump to content

Notice: Undefined index


m00nz00mer

Recommended Posts

hey, got abit of a problem, ive got this small login script and its working on my mates host however when i upload it, i get Notice: Undefined index: loginUserName on line 17 which is...

 

<?

$username = "admin";

$password ="password";

 

if ($_POST['loginUserName']!= $username || $_POST['loginPassword']!= $password) {

?>

 

<h4>Login Below:</h4>

 

<div class="detailTextGrey">

 

<!-- Login Form -->

<form name="form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">

User Name: <input type="text" name="loginUserName" /> <br />

Password: <input type="password" name="loginPassword" /> <br /><br />

 

<input type="hidden" name="submitted" value="1" />

<input type="submit" value="Submit" />

</form>

 

</div>

 

<?

}

else {

?>

 

anyone know why im getting this error?

 

 

Link to comment
https://forums.phpfreaks.com/topic/97165-notice-undefined-index/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.