HELP!!! Problem with undefined index....

Hey can anyone tell me why im getting the following undefined notice for the code straight after:

Notice: Undefined index: login in C:\xampp\htdocs\Care2Share\loginC2S.php on line 43

[PHP]

<?php $form = "
"; if ($_POST['login']) { } else { echo "$form"; } ?>

[/PHP]

I’m quite sure im collecting the text name ‘login’ from inside the definition of the variable $form. But im still getting that notice in the browser for the part of the code where im attempting to apply $_POST[‘login’] in the if statement condition.

Can anyone help? I am new to this so is probably a pretty straight forward solution.

Notice was in another file, try to post this file.

Your file works fine

Fixed using:

[php]if (isset ($_POST[‘login’]))[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service