Re: POSTing HTML into a database

From: Date: Mon, 07 Jan 2002 01:59:06 +0000
Subject: Re: POSTing HTML into a database
Groups: php.general 
Request: Send a blank email to php-general+get-79633@lists.php.net to get a copy of this message
I've used a combination of addslashes() and stripslashes() along with htmlspecialchars() to perform just that sort of thing, though I used MySQL instead of PostreSQL. Does anyone know, by the way, if there's a port of PostreSQL to Windows 2000? Or can I run it in Cygwin? At 03:45 PM 1/6/2002, James Arthur wrote:
Hi I need a user to be able to enter submit HTML code (also perhaps containing PHP code) via a web form, which will then be entered into a database. The data is typed in to a textarea, which is then posted to my script. I notice that some special characters come out of this process escaped, but the escaping sequence does not appear to be entirely compatible with the SQL query I'm using to insert it into a table. Can anyone tell me the correct way to convert the output from the form into a format that PostgreSQL will accept, and then how to convert it back so that it's identical to what the user entered before being escaped by post (so that I can just use print to print it out)? Thanks. --jaa -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net
Sliante, Richard S. Crawford http://www.mossroot.com AIM: Buffalo2K ICQ: 11646404 Y!: rscrawford MSN: underpope@hotmail.com "It is only with the heart that we see rightly; what is essential is invisible to the eye." --Antoine de Saint Exupéry "Push the button, Max!"

« previous php.general (#79633) next »