Re: addslashes, stripslashes, htmlspecialchars

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The functions you're wondering about are designed for dealing with inserting
user input into a database.  If you have a form in which someone can enter text,
you need to process the input with addslashes() in case the user input contains
quotes.  htmlspecialchars() and htmlentities() have similar uses.

If your webpage broke because a hyperlink in the database included quotes, you
need to either manually add slashes to the text in the database or re-write your
form processing script to include addslashes() and insert the data again.

Edward Dudlik
Becoming Digital
www.becomingdigital.com


----- Original Message -----
From: "Steve B." <stylinsty@yahoo.com>
To: <php-db@lists.php.net>
Sent: Friday, 13 June, 2003 19:22
Subject:  addslashes, stripslashes, htmlspecialchars


Hi this is about PHP commands even though has mysql too.
I go to mysql board when I find one they said MySQL is not necessarily PHP
driven and if I want
PHP specific questions to go to a PHP list.

How do you deal with forms, db storage of the data and calling it up in a form
to edit?

The online tutorials I have covered to not address this except with addslashes
on one of them.
My web page broke when I added a hyperlink in the description because of the '

Previously:
used .asp and always set the db in a way similar to parameters? in MySQL
Sometimes I did urlencode() on a get string to make the spaces and other
characters work.

tried addslashes and noticed it does add them, right in the db.
Is this the standard? add and remove slashes?
other thing confusing me is the htmlentities which may do this better?

Thanks,
Steve


__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux