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 Quote Link to comment Share on other sites More sharing options...
trq Posted October 29, 2008 Share Posted October 29, 2008 Where is $x defined? Quote Link to comment 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'/> Quote Link to comment 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?? Quote Link to comment Share on other sites More sharing options...
jkkenzie Posted October 29, 2008 Author Share Posted October 29, 2008 any idea Quote Link to comment Share on other sites More sharing options...
Flames Posted October 29, 2008 Share Posted October 29, 2008 http://uk2.php.net/stripslashes Quote Link to comment Share on other sites More sharing options...
solon Posted October 29, 2008 Share Posted October 29, 2008 do you have any "\" in your code? Quote Link to comment 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 Quote Link to comment 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 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.