|
Posted by Danny on 01/08/06 17:23
Thanks for the answer. I tried:
$par = mysql_real_escape_string($p1);
then i want to update this, but it only stored the temp filename of the file
nothing else.
William
> Hash: SHA1
>
> William Young wrote:
>> Hello all,
>>
>> I want to read the contents of a html file into a blob field in my mysql
>> database.
>>
>> The function $par = file_get_contents($p1);
>>
>> p1 is the file field. I need the html source code with all the tags to be
>> placed into the database by an UPDATE.
>>
>> It doesnt work somehow, but i dont know what the error is.
>>
>> Can someone please help me out here?
>
> Did you escape the html source code before adding it to the UPDATE query?
> Have a look into mysql_escape_string and/or mysql_real_escape_string.
>
> By the way, do you thing it makes sense to store those files into your
> database?
>
> Regards
> Stefan
>
>>
>> William
>>
>>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1rc2 (MingW32)
>
> iD8DBQFDwSLtyeCLzp/JKjARAvq9AJwLeha/rrVZmJQojY1yJUQ+KEz1LgCgr252
> kZgzYf68ZNE3h9Wqo1imiro=
> =6+T4
> -----END PGP SIGNATURE-----
Navigation:
[Reply to this message]
|