wmguk Posted November 10, 2008 Share Posted November 10, 2008 hey, I pass a variable via a hidden form field, <input name="pricing" type="hidden" value="<? echo $pricing; ?>" /> then on the second page i have <? $pricing = $_POST['pricing']; echo $pricing; ?> it should show school portraits, however it only says school how can i get it to show both words? Quote Link to comment https://forums.phpfreaks.com/topic/132217-lose-the-second-word-in-a-text-variable/ Share on other sites More sharing options...
DeanWhitehouse Posted November 10, 2008 Share Posted November 10, 2008 First off it's bad practice to use short tags, and second off you are not showing enough code. From what you have shown it appears that $pricing is undefined until it has been posted, which would then make it empty. Quote Link to comment https://forums.phpfreaks.com/topic/132217-lose-the-second-word-in-a-text-variable/#findComment-687262 Share on other sites More sharing options...
AndyB Posted November 10, 2008 Share Posted November 10, 2008 Normally, that behaviour comes from unquoted variables in the form inputs. Your's looks OK. View the HTML source (of your form) to confirm you really do have quoted variables. Quote Link to comment https://forums.phpfreaks.com/topic/132217-lose-the-second-word-in-a-text-variable/#findComment-687263 Share on other sites More sharing options...
wmguk Posted November 10, 2008 Author Share Posted November 10, 2008 hmmm, ok, sorry, ugh! just realised on viewing the page source that the form was displaying the wrong info in the hidden field!! Quote Link to comment https://forums.phpfreaks.com/topic/132217-lose-the-second-word-in-a-text-variable/#findComment-687270 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.