I think the question is a bit confusing but technically I am passing a value from one page :
<a href="Admin-updateGamesFunctions.php?gameID=<?php echo $file['gameID'];?>">Update</a>
As you can see when I click the link "Update" I will be redirect to the next page (Admin-updateGamesFunctions.php) while passing the value gameID. I'm receiving the value by using :
if(isset($_GET['gameID']))
{
$updateGame = $_GET['gameID'];
}
Now everything about the page works perfectly. However, when I'm done submitting the form I try to redirect back to the same page while retaining the gameID I got from previous page. This here is my current code for that :
header(" location : Admin-updateGamesFunctions.php?gameID=".$updateGame);
However when it redirects all I got is :
Server error! The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.
P/S : Not sure if this is needed but I'm avoiding including the previous page due to reasons.
Edit :
Doing what @Felix Mellitzer said does help in removing the error. (Need to remove the header first) Anyway the reason I'm trying to retain the gameID is because I'm using echo at the page that shows all the attributes of the object (games) based on its gameID. So I was hoping that after I done submitting the form (which updates the attributes of the game) it will also update the data echoed on the page. However the data echoed on the page is not updated.
Edit 2 : I already found out how to update the echoed data. Just use
header("Refresh:0");
Thanks everyone!