Tjorriemorrie Posted July 8, 2008 Share Posted July 8, 2008 Hey! I used the insert record which is provided by Dreamweaver. And i have a page insertcomplete.php where it redirects to after it was inserted. However, now i need to also carry over 2 variables via GET. Here's the default code: $insertGoTo = "insertcomplete.php"; if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $insertGoTo)); I have to add the $kingdom and $zone variables to that, e.g. "insertcomplete.php?kingdom=$kingdom&zone=$zone" , but ofcourse that doesn't work. any help appreciated!! Quote Link to comment https://forums.phpfreaks.com/topic/113719-how-to-edit-dmws-_serverquery_string/ Share on other sites More sharing options...
themistral Posted July 8, 2008 Share Posted July 8, 2008 insertcomplete.php?kingdom=$_GET[kingdom]&zone=$_GET[zone] You need to reference the name of the values you are GETting. Quote Link to comment https://forums.phpfreaks.com/topic/113719-how-to-edit-dmws-_serverquery_string/#findComment-584381 Share on other sites More sharing options...
pdkv2 Posted July 8, 2008 Share Posted July 8, 2008 Before the header function use $insertGoTo = $insertGoTo."?kingdom=". $kingdom . "&zone=" . $zone ; Cheers !! Quote Link to comment https://forums.phpfreaks.com/topic/113719-how-to-edit-dmws-_serverquery_string/#findComment-584382 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.