content from DB into dropdown menu (content has quotes)
Posted: Thu Oct 28, 2004 10:11 pm
Hi,
Basically my subject askes the question...the problem isn't with how to do have content from a DB into a drop down menu, but it's when the content from the DB has quotes, that's when it value doesn't show everything.
here's my code
Now i'm pretty sure i can change the stripslashes to something else, but i don't what will make it work...i've tried addslashes, and htmlentities....
Thank you
Basically my subject askes the question...the problem isn't with how to do have content from a DB into a drop down menu, but it's when the content from the DB has quotes, that's when it value doesn't show everything.
here's my code
Code: Select all
PHP Code:
<select name="icons[]" size="10" multiple id="icons[]"
<option value=""></option>
<?php
do {
?>
<option value="<?php $value = stripslashes($value); echo $value?>"><?php echo $row_icons['icon']?></option>
<?php
} while ($row_icons = mysql_fetch_assoc($icons));
$rows = mysql_num_rows($icons);
if($rows > 0) {
mysql_data_seek($icons, 0);
$row_icons = mysql_fetch_assoc($icons);
}
?>
</select>Now i'm pretty sure i can change the stripslashes to something else, but i don't what will make it work...i've tried addslashes, and htmlentities....
Thank you