Hey again all,
Sorry to waste your time, I have just noticed that a few lines up the code was like this:
echo "<input type='submit' value='Save Group' name='editgroupsubmit'>";?>
The ?> should not have been right beside the ; I moved it to
echo "<input type='submit' value='Save Group' name='editgroupsubmit'>"; ?>
And now it works.
Cheers,
Adam