我有一個從用戶收集數據並將它們插入到mySQL數據庫中的表單。我的問題是呈現使用重定向提交給用戶的數據。我創建了一個簡單的函數redirect_to($var1)
,它工作正常。使用重定向傳遞多個變量的語法錯誤
問題出現與此語法:
redirect_to("serraRedirect1.php?lastname=$_GET['lastname']&firstname=$_GET['firstname']&emailconf=$_GET['emailconf']&entree=$_GET['entree']&lastname2=$_GET['lastname2']&firstname2=$_GET['firstname2']&entree2=$_GET['entree2']&meal_cost=$_GET['meal_cost']");
該錯誤消息是'unexpected "' in line xxx
。
我做了幾處修改,但沒有做任何工作。
我需要幫助才能獲得正確的語法。
穿上' 「'之前每個'$ _GET';並把'。」 ''']'' – cyadvert