WEll for example i got this:
In a field called name i write a name with single quotes for example 'Alex'
and click submit... in the verify.php i store the data i filled in the
form.php that contains name, surnmane,etcetc...
so when i save my data to the db i use the addslashes($name) in this case...
and the i look up the database and i see that the valeu oin my db for name
is like i wrote it in this cas 'Alex'.. that's perfect.. but when i try to
retrieve the user data in another page for example change_user.php i want to
retrive the user name and show it in a text box but it doesnt show up.. and
i have this code:
<td><input type='text' name='name' value='".stripslashes($userName)."'
where userName i retrieved from the data base with a simple query..
so tell me what is wrong there!...Thanks!
"Justin French" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
on 21/12/02 2:00 PM, Alexander Guevara ([EMAIL PROTECTED]) wrote:
> It works.. but when you retrieve the data from the database to a text box
> doesnt appear if it has the single quote ('), o tought it was cause i have
> the stripslashes but i delete stripslashes and it still doesnt appear in
> text box!
Huh? I can't really understand what you're saying.
If you're adding stuff to a database, and getting an error, use
addslashes(), then on the way out of the database, you need to
If you don't get any errors, then magic quotes is probably enabled in your
> "Justin French" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> don't filter the quotes... escape them with add_slashes()
> on 20/12/02 10:50 PM, ŞüYam ([EMAIL PROTECTED]) wrote:
>> as title that I'm getting a trouble on filtering the single quote ' ,
>> there would be error when storing those string into MySQL, thus, i have
>> find the appropriate method to solve it, anybody can help please?
>> thx a lot
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php