robert_gsfame Posted July 29, 2009 Share Posted July 29, 2009 assume that i have two column firstname = 'jane' and lastname='Lambert' then i want to get the value using $_POST $firstname = $_POST['firstname']; $lastname = $_POST['lastname']; echo $firstname.' '.$lastname =====> result Jane Lambert what if firstname = 'Jane' and lastname='Lambert Sugar' echo $firstname.' '.$lastname =====> result Jane Lambert ???? it will only take Jane and Lambert, how to make the third words included into lastname so that it will result Jane Lambert Sugar Help please Link to comment https://forums.phpfreaks.com/topic/167989-need-help-_post/ Share on other sites More sharing options...
PFMaBiSmAd Posted July 29, 2009 Share Posted July 29, 2009 What context are you using the echo'ed output? A space character can serve as a 'stop' character depending on how the output is being used on the page. Link to comment https://forums.phpfreaks.com/topic/167989-need-help-_post/#findComment-886037 Share on other sites More sharing options...
robert_gsfame Posted July 29, 2009 Author Share Posted July 29, 2009 so what should i do?? i want they ignore the space, so that i could get the value after the space Link to comment https://forums.phpfreaks.com/topic/167989-need-help-_post/#findComment-886040 Share on other sites More sharing options...
robert_gsfame Posted July 29, 2009 Author Share Posted July 29, 2009 is it okay to use urlencode?? Link to comment https://forums.phpfreaks.com/topic/167989-need-help-_post/#findComment-886053 Share on other sites More sharing options...
PFMaBiSmAd Posted July 29, 2009 Share Posted July 29, 2009 What context are you using the echo'ed output? Cannot really help you until you answer the question about what you are actually doing. is it okay to use urlencode?? Only if you are attempting to pass the value through a URL. Link to comment https://forums.phpfreaks.com/topic/167989-need-help-_post/#findComment-886056 Share on other sites More sharing options...
bruce080 Posted July 29, 2009 Share Posted July 29, 2009 Try switching to _GET and post the results. I would like to know if the full last name is getting passed to the server. Link to comment https://forums.phpfreaks.com/topic/167989-need-help-_post/#findComment-886057 Share on other sites More sharing options...
robert_gsfame Posted July 29, 2009 Author Share Posted July 29, 2009 Yeah i'm trying to pass it through url i've tried and it worked Link to comment https://forums.phpfreaks.com/topic/167989-need-help-_post/#findComment-886062 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.