Page 1 of 1

[SOLVED] Newbie question

Posted: Tue Apr 19, 2005 8:22 am
by lazersam
Hi - I'm not really a newbie but I have a newbie problem...

I have placed this html code into a variable ($default_personal_text_1) and want to put it into a database...

Code: Select all

<p align=&quote;center&quote;>Get a site like this one and MAKE $$$ Every Single Day! I will 
personally help you to $uccess!</p>
problem is the php is reading the html as part of the php code and not as the variable that it is...

Code: Select all

$sql = "update profile set personal_text_1 = \"$default_personal_text_1\"")";
Any suggestions?

Larry

Posted: Tue Apr 19, 2005 8:27 am
by feyd
mysql_real_escape_string() or mysql_escape_string() :?:

Posted: Tue Apr 19, 2005 8:39 am
by lazersam
Thanks fyed... i tried 'addslashes' and it works!

Regards

Larry.