I'm populating a popup menu with some options stored in a mysql database. for the option im using this
<option value="<?=stripslashes($newaa['GalProse'])?>"><?=stripslashes($newaa["GalProseName"])?></option>
with this though if there is a double quote it wont show up. On the reverse.......
<option value='<?=stripslashes($newaa["GalProse"])?>'><?=stripslashes($newaa["GalProseName"])?></option>
.....i wont get single quotes
double quote problem
Moderator: General Moderators
Re: double quote problem
huh?
stripslashes() will remove any slashes thereby removing the escape from your quotes. What is your problem exactly? Your first post is very vague.
stripslashes() will remove any slashes thereby removing the escape from your quotes. What is your problem exactly? Your first post is very vague.
Re: double quote problem
if ive got an entry in my mysql database under GalProse
entry = We'll say "hello"
in the first option the value would loose everything after the first "
in the second option the value would loose everything after We due to the opening of quotes in the value. if i dont use quotes then the value will only be the first word
entry = We'll say "hello"
in the first option the value would loose everything after the first "
in the second option the value would loose everything after We due to the opening of quotes in the value. if i dont use quotes then the value will only be the first word
Re: double quote problem
so then pick a quoting type, stripslashes() and replace the chosen quote type with \%quotetype%
Re: double quote problem
i dont get what you mean by /%quote type%
Re: double quote problem
i still cant find anything on google for that
Re: double quote problem
%quotetype% is just whichever quote type you choose to use (double or single) for your <select> boxes.
Re: double quote problem
im not the one who will be inputting data into the mysql database. so ill have to leave a disclaimer letting people know to use single quotes only rather than double quotes.