Jason Sheets wrote:

You're problem is that you are enclosing your value for your <option
tags with single quotes ('), when you fetch the value from the database
the single quote in 's ends the value='' assignment in your HTML. You
can use echo "<option value=\"$algen\">$algen"; which will solve your
single quote problem. You could also addslashes on your value and then
stripslashes when you want to operate on it, example '<option value="' .
addslashes($algen) . '">' . $algen . '">';


That doesn't seem to work. Here's how I'm typing my code. Do you see a problem here?

echo '<option value="' . addslashes($algen) . '">"' . ($algen) . '">\n';

or

echo "<option value=\"$algen\">$algen\n";

or

echo "<option value=\"$algen\">$algen>\n";

Bob


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to