harsh00008 Posted July 29, 2008 Share Posted July 29, 2008 Hey if i get "id=12" with the $_SERVER["QUERY_STRING"] command how do i assign a variable to the 12 in the result "id=12"? Quote Link to comment Share on other sites More sharing options...
harsh00008 Posted July 29, 2008 Author Share Posted July 29, 2008 So that i can echo only the "12" part of the result "id=12" by $_SERVER["QUERY_STRING"] command? ??? Quote Link to comment Share on other sites More sharing options...
jonsjava Posted July 29, 2008 Share Posted July 29, 2008 are you talking about something like index.php?id=12 ? If so, the answer would be: <?php $id = $_GET['id']; ?> don't forget to sanitize the user input (the GET) before you add it to any query. Quote Link to comment Share on other sites More sharing options...
harsh00008 Posted July 29, 2008 Author Share Posted July 29, 2008 Thnx worked like a charm Quote Link to comment 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.