我可以在Meta Http Equiv Refresh中传递变量吗?

I just finished this script it works well, but I am struggling to pass along the $invite variable to the register.php page. Can someone please tell me how I can achieve this? I have it defined as $invite = $_POST['inviteinput'];

How do I get the users input from index.php to transfer to register.php? Thank you for your help!

HTML FORM:

    <form action="index.php" method="post">
    What is your Invite Code?<BR />
    <input class="textbox" name="inviteinput" type="text" />
    <BR />
    <input type="hidden" name="formsubmitted" value="TRUE" />
    <input name="Submit" type="submit" value="Verify" />
    </form>

PHP:

<?PHP
include ('scripts/dbconnect.php');

if (isset($_POST['formsubmitted'])) {

if (empty($_POST['inviteinput'])) {
echo '<div class="errormsgempty"><u>ERROR</u>:<br>You must enter a valid invite code to proceed!</div>';
} else {


$invite = $_POST['inviteinput'];//else assign it a variable
$invite = stripslashes($invite);
$invite = mysql_real_escape_string($invite);

$sql = "SELECT yourMemberId FROM Register WHERE yourMemberId='$invite'";
$result = mysql_query($sql);

if(mysql_num_rows($result) > 0) {

echo '<META HTTP-EQUIV="Refresh" Content="0; URL=register.php">';   
} else { 
echo '<div class="errormsgbox"><u>ERROR</u>:<br>The Invite Code you entered ' . $invite . ' is NOT a valid invite code!</div>';
//($notvalidcode = "The Invite Code you entered <strong>" . $invite . "</strong> is NOT a valid invite code!");
}
}
}
?>

There are a few ways Save it in a session

session_start();
$_SESSION['invite'] = $invite;

2nd is you can pass it via get

echo '<META HTTP-EQUIV="Refresh" Content="0; URL=register.php?invite=' . $invite . '">'; 

I would recommend option 2. Also, why are you doing $invite = $_POST['inviteinput']; twice?

Absolutely. Just add it to the URL:

<meta http-equiv="Refresh" Content="0; url=register.php?var=value&othervar=hello" />

Note that you may be better off using:

header("Location: register.php?var=value&othervar=hello");
exit;