-1

Im getting the following error: Notice:undefined index:done please advise what is wrong

 <?php
        if($_Get['done']==1 $msg = "Account details saved";

 ?>
Webjunkie
  • 41
  • 7

1 Answers1

1

Check first if the key exists, then the comparison to 1.

if (isset($_GET['done']) && $_GET['done'] == 1) {
    $msg = '...';
}
Kevin
  • 41,694
  • 12
  • 53
  • 70
pavel
  • 26,538
  • 10
  • 45
  • 61