I'd probably do the following instead of assigning the $GET value to a new variable:
if(isset($_GET['submit']) and $_GET['submit'] == 'true')
{
PS: I should probably explain that in this case, because PHP evaluates the "and" condition from left to right, it only does the $_GET['submit'] == 'true' comparison if the isset($_GET['submit']) expression evaluates as true (since if it's false then the parser knows the whole "and" expression must be false, so it doesn't need to evaluate the second part). Therefore you avoid the invalid index notice if the variable is not set.