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 Quote Link to comment 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. Quote Link to comment 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 Quote Link to comment 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?? Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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 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.