我有一個表單,一旦用戶點擊提交按鈕,他就會發送到save.php頁面。在save.php頁面上,表單的信息被髮送到MySQL表格。但是,在save.php頁面上,我放置了一個rederict,將用戶帶到一個獨特的頁面,在那裏他可以看到他剛輸入的信息。獲取MySQL值在URL中放置
要做到這一點,我把與用戶的信息的唯一代碼放在表中,以放置在「獨特的頁面」的URL。這是涉及我所談論的代碼的一部分。
$registerquery = mysql_query("INSERT INTO users_event (x, x, x, x, x, Confirm_code) VALUES('".$x."', '".$_SESSION['x']."', '".$x."', '".$x."', '".$x."', '".$confirm_code=md5(uniqid(rand())). "'); ");
if($registerquery)
{
echo "<h1>Congrats!</h1>";
echo "<p>All perfect!</p>";
echo "<meta http-equiv='refresh' content='0;URL=show2.php?confirm_code=<?php echo $registerquery[Confirm_code];?> />";
}
我的問題是,confirm_code從不顯示在URL中。所以,這個獨特的頁面既不。我怎樣才能讓確認代碼顯示在URL中?
使用'show2.php?confirm_code = <?php echo $ confirm_code; ?> –
它不工作... – freddy
你不能在'mysql_query()'函數內創建一個php變量。 – Sean