Not too sure what is really going on there, but one thing for sure your if statement is flawed, you should remove unneeded ELSE, should be like this:
if (is_user_logged_in()) {
if (isset($_GET['id'])) {
$id = $_GET['id'];
show_submission($id);
} elseif(has_submission())
{
$url="http://".$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"].'?id='.$get_submission_id();
header('Location: '.$url);
} else {
show_form();
}
}
OR like this:
if (is_user_logged_in()) {
if (isset($_GET['id'])) {
$id = $_GET['id'];
show_submission($id);
} else {
if(has_submission()) {
$url="http://".$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"].'?id='.$get_submission_id();
header('Location: '.$url);
} else {
show_form();
}
}
}
Maybe this will fix the error