Storing HTML in a DB field...

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

 



I know I have seen this before, but can't remember and am hard pressed
for time.

I have an app which wrote a bunch of HTML (tables, style definitions,
etc) to a file and then it was displayed later.  Well now, instead of
saving it to a file, I want to store it in MySQL.  It keeps failing.  Do
I need to do anything special before I insert it?

Right now, my query looks like this:

$sql = "INSERT INTO orders SET user_id = ".$_POST['user_id'].", order =
'".$WRITE_TO_FILE."'";

Where WRITE_TO_FILE is a var which has all the data via

$WRITE_TO_FILE .= "blah blah";
$WRITE_TO_FILE .= "blah blah";
$WRITE_TO_FILE .= "blah blah";
$WRITE_TO_FILE .= "blah blah";



-- 
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