Forum Moderators: coopster
I just see the post value(Nepal only) instead of Nepal's Finest
I am sure it is because of aphostrophe, how to display that post value on another page.
Samu
To: penders,
echo '<pre>'.print_r($_POST,true).'</pre>'; result of this produces:
Array
(
[1] => Nepal // instead of Nepal's Finest
[2] => New Coffee
[3] => Ethopian
[4] => Kenya AA
)
On the form where user select item and post for next page.I have the following echo code shown below.
echo "<td class='littletablerow'><input name='coffeename[$i]' type='hidden' value='$name'></td></tr>";
To: dreamcatcher,
Could give me an exaple of htmlspecialchars.
Thank you both for help
Samu
One thing that was dubious about your code, was the use of single quotes to delimit your HTML attributes in your form. But your form values contain single quotes. Unless the single quotes in your form values are encoded (perhaps with htmlspecialchars() as dreamcatcher suggested) then you could end up outputting invalid HTML and you'd only see "Nepal" in your form. (Although I would have thought you should still have seen the full "Nepal's Finest" when examining the $_POST[] array server-side when the form was first posted?)