Re: stripslashes problem

From: Date: Mon, 10 Mar 2003 10:08:46 +0000
Subject: Re: stripslashes problem
Groups: php.windows 
Request: Send a blank email to php-windows+get-18936@lists.php.net to get a copy of this message
Can't you just use <?php print stripslashes($name); ?> Where the name should be visible, and never really modify the variable, just the output...? . bobo . "rotsky" <rotsky@wanadoo.fr> skrev i meddelandet news:20030310093102.26179.qmail@pb1.pair.com... > I have a user registration form. If someone enters a name like O'Brien, then > it turns up on the next page (having been POSTed) as O'\Brien. So I use > stripslashes() to remove the slash and it displays fine. So far so good. > > Then I POST the details again to the next page which writes the details to > the database. Except now it's just O - I presume the single quote has been > taken as some kind of delimiter or something and the rest of the string has > disappeared. I guess I could wait until that final page before applying > stripslashes (just before writing to the database) but that means the slash > still appears on the intermediate page (which is there to show people what > they've entered and get them to confirm it's okay). What can I do? Is there > a way of printing O'\Brien to the screen that doesn't show the slash? > > Appreciate your comments. > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.windows (#18936) next »