csckid Posted September 9, 2010 Share Posted September 9, 2010 I'm passing variable through GET method. What can be the maximum length of the variable? http://localhost/my.php?variable1='abc'&variable2='cdf' Q) What can the total length of URL? Q) what can the total length of variable? for example length of abc and cdf in this case. Quote Link to comment https://forums.phpfreaks.com/topic/212940-get/ Share on other sites More sharing options...
bh Posted September 9, 2010 Share Posted September 9, 2010 Hi, You can get the entiry URL with $_SERVER['REQUEST_URI']. And you can get info about the string length with strlen. What can be the maximum length of the variable? -> theres a max length of the URL but not one by one variable: link Quote Link to comment https://forums.phpfreaks.com/topic/212940-get/#findComment-1109079 Share on other sites More sharing options...
JasonLewis Posted September 9, 2010 Share Posted September 9, 2010 If you're going to have a really, really long query string, may I suggest using POST instead. Only if it's like really long though, so long that it takes you a while to scroll back through to find the start. Quote Link to comment https://forums.phpfreaks.com/topic/212940-get/#findComment-1109080 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.