Hi folks,
I am trying to transfer data from a select list and am having problems
with special characters stopping the transfer. The data is presented in
a form as follows:
$query = "SELECT algen FROM allist WHERE altyp = 'W' ORDER BY algen";
$result_1 = mysql_query($query)
or die ("Couldn't execute query.");
/* create form containing Weed selection list */
echo "<tr><td><form action='./calc/pad_test.php' method='post'>
<select name='weed_$i'>\n";
while ($row = mysql_fetch_array($result_1))
{
extract($row);
echo "<option value='$algen'>$algen\n";
}
The problem arises when one of the strings from the table algen has an
apostrophe in it such as "Queen Anne's Lace" or "Lamb's Quarters". It
displays properly in the form. What is passed to $HTTP_POST_VARS is:
"Queen Anne" or "Lamb".
How can arrange my code to pass the entire strings to $HTTP_POST_VARS
and not just the truncated versions?
Thanks
Bob
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
- Re: [PHP] An "escape special characters" ... Robert E. Harvey, M.D.
- Re: [PHP] An "escape special characters&q... Jason Sheets
- Re: [PHP] An "escape special characte... Robert E. Harvey, M.D.
- Re: [PHP] An "escape special characters&q... Jason Wong

