xwishmasterx Posted October 4, 2011 Share Posted October 4, 2011 Hello I am use to getting a members id fromthe URL using simple isset. The url looked like this ".....?r=membername". So getting the "r" value was easy. Now I have a url looking like this: ".....?membername". Is it still easy to get the membername? How should that be coded? Thanks Link to comment https://forums.phpfreaks.com/topic/248394-getting-id-from-url/ Share on other sites More sharing options...
Muddy_Funster Posted October 4, 2011 Share Posted October 4, 2011 why did your url change? Link to comment https://forums.phpfreaks.com/topic/248394-getting-id-from-url/#findComment-1275574 Share on other sites More sharing options...
xwishmasterx Posted October 4, 2011 Author Share Posted October 4, 2011 It didn't. I just need to do the same thing on another site using this other form:) Link to comment https://forums.phpfreaks.com/topic/248394-getting-id-from-url/#findComment-1275576 Share on other sites More sharing options...
Marooon Posted October 4, 2011 Share Posted October 4, 2011 i dont think there is a url like that . it is either a GET method with format like : www.blalba.com?r=vlaue which you can get with $_GET['r'] or a post method with format like : www.blalba.com which you can get with $_POST['r'] please correct me if i am wrong . Link to comment https://forums.phpfreaks.com/topic/248394-getting-id-from-url/#findComment-1275580 Share on other sites More sharing options...
dougjohnson Posted October 4, 2011 Share Posted October 4, 2011 I think you are always going to need 2 items to pass a variable using a URL. First is the variable name to be passed and second is the variable value to be passed. So... urlstuff?membername=<? echo $membernamevalue; ?> that might work? On the receiving end: $membername = $_GET["membername"]; Link to comment https://forums.phpfreaks.com/topic/248394-getting-id-from-url/#findComment-1275639 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.