Silly question.
Posted: Tue Sep 23, 2008 10:34 am
Trying to wipe the cobwebs from by head and make a php content control panel that basically reads a selected XML file, opens it, displays it, lets you make changes, add or remove an entry, yada yada.
That all works fine and well.
My problem is some of my data that it pulls from the xml file and sets to variables contains ', as in Steve's.
when displaying such a variable, i have no problems but when I set a default value for a form input textbox, as in when you edit a particular XML entry, it displays the current data as the default text in the text box before you change it, it cuts the string off when it gets to that ', as is Steve's. (it shows Steve in the textboxt, instead of Steve's bla bla bla).
my code is as such:
<input type='text' name='eventwhat' size = '65' value ='".$events_array[$eventid]->eventwhat."' />
for this instance, $events_array[$eventid]->eventwhat holds the string "Melissa's Marvelous Makeovers" and when displayed in the text box, i get Melissa, because of the '.
Is there a way I can get around that so the ' doesnt cut off the text in the textbox?
That all works fine and well.
My problem is some of my data that it pulls from the xml file and sets to variables contains ', as in Steve's.
when displaying such a variable, i have no problems but when I set a default value for a form input textbox, as in when you edit a particular XML entry, it displays the current data as the default text in the text box before you change it, it cuts the string off when it gets to that ', as is Steve's. (it shows Steve in the textboxt, instead of Steve's bla bla bla).
my code is as such:
<input type='text' name='eventwhat' size = '65' value ='".$events_array[$eventid]->eventwhat."' />
for this instance, $events_array[$eventid]->eventwhat holds the string "Melissa's Marvelous Makeovers" and when displayed in the text box, i get Melissa, because of the '.
Is there a way I can get around that so the ' doesnt cut off the text in the textbox?