Hi
okie heres a snippet of my php code:
the code below takes a file uploaded from the web with $file as declared filename on
the form.
if ($file_size>0) { //check whether the file is not empty
$data = addslashes(fread(fopen($file, "r"), filesize($file))); //read the file and
add neccessary quotes
$SQL="Insert into Files (Filename,Filetype,Filesize,data) values
('$file_name','$file_type','$file_size','$data')"; //SQL commands to insert into table
named 'FILES'
$result = mysql_query ($SQL)
or die ("ERROR Uploading File:".mysql_errno().": ".mysql_error()."<BR>$SQL");
}
okie hope that helps!
Teddy
[EMAIL PROTECTED] wrote:
> Hi,
>
> I am having some problems inserting data into a blob field, everything works
> fine but if I use any HTML and try to insert it, it doesn`t work. So in short
> is there something I should be doing to allow HTML to go into a text blob? I
> am using PHP if that helps.
>
> TIA
> Ade
>
> ---------------------------------------------------------------------
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php