-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,329
  • 12
  • 52
  • 68
pavel
  • 25,361
  • 10
  • 41
  • 58