jkkenzie Posted October 29, 2008 Share Posted October 29, 2008 I have this line of code on my form: action="chooseproject3.php?countries=<?php echo $x;?>" When am in my new page: i use echo $_GET['countries']; to show on page but i get no results? help. thanks Link to comment https://forums.phpfreaks.com/topic/130556-solved-_get/ Share on other sites More sharing options...
trq Posted October 29, 2008 Share Posted October 29, 2008 Where is $x defined? Link to comment https://forums.phpfreaks.com/topic/130556-solved-_get/#findComment-677312 Share on other sites More sharing options...
solon Posted October 29, 2008 Share Posted October 29, 2008 You should use $_POST['countries']; countries being a (name or id) of aninput field like <input type='hidden' name='countries' id='countries' value='$your_variable'/> Link to comment https://forums.phpfreaks.com/topic/130556-solved-_get/#findComment-677314 Share on other sites More sharing options...
jkkenzie Posted October 29, 2008 Author Share Posted October 29, 2008 taking solon advice : i get: American Samoa\', \'Andorra\', \'Angola\', \'Anguilla\', \'Armenia\', \'Canada: how do get rid of the \ mark?? Link to comment https://forums.phpfreaks.com/topic/130556-solved-_get/#findComment-677322 Share on other sites More sharing options...
jkkenzie Posted October 29, 2008 Author Share Posted October 29, 2008 any idea Link to comment https://forums.phpfreaks.com/topic/130556-solved-_get/#findComment-677326 Share on other sites More sharing options...
Flames Posted October 29, 2008 Share Posted October 29, 2008 http://uk2.php.net/stripslashes Link to comment https://forums.phpfreaks.com/topic/130556-solved-_get/#findComment-677328 Share on other sites More sharing options...
solon Posted October 29, 2008 Share Posted October 29, 2008 do you have any "\" in your code? Link to comment https://forums.phpfreaks.com/topic/130556-solved-_get/#findComment-677338 Share on other sites More sharing options...
jkkenzie Posted October 29, 2008 Author Share Posted October 29, 2008 No i didn't have any \ in my code though: That worked thanks, if i have a variable = to xxxx', 'yyy', 'zzz', ' like that onwards is there a function that can break and make it to echo as below? xxxx yyy zzz thanks again Link to comment https://forums.phpfreaks.com/topic/130556-solved-_get/#findComment-677343 Share on other sites More sharing options...
solon Posted October 29, 2008 Share Posted October 29, 2008 Check this out! I think it will help you http://www.php.net/manual/en/function.array-chunk.php Link to comment https://forums.phpfreaks.com/topic/130556-solved-_get/#findComment-677346 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.