Re: [PHP-DB] Insert a file in a mysql database!

2001-03-05 Thread Beau Lebens

check in the manual under the features section, a part called Handling file 
uploads.

you need to use a multipart/form-data html form, which then posts the 
contents of the file to the server. once it is there, you can parse it into 
a single variable and save that into the db just like you would anything 
else, or you can write it to disk somewhere and save a path for it.

getting it back out - make sure you also save the mime-type of the file, 
then just pass the mimetype as a header, and then spit out the contents of 
the file (if it's saved in the db)

HTH
Beau

At 01:03 PM 3/3/01 -0800, Pedro M. S. Oliveira wrote:
Hi all...
Here i am once again asking for advice :)
well i need to put a file (something lika *.doc or *.rtf) on a mysql
database.
The thing is: the user need to upload a computer file to the mysql runing
over a linux box.

i would like to know:
1) what is the best way to do this?
2) what is the html code i have to generate do do this?
3) how can i read this back from the database?

i read something about sending the file over ftp and then on the database
put just the path to the file.
but what is your opinion?
thankx



***
Pedro Miguel Silva Oliveira
Cell Phone: +351 96 5867227
SMS: [EMAIL PROTECTED]
Email: [EMAIL PROTECTED]


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
Beau Lebens - Web Master
Insurance My Way, Your Friendly Online Broker
(08) 9226 5888
http://www.insurancemyway.com.au/


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Insert a file in a mysql database!

2001-03-03 Thread Pedro M. S. Oliveira

Hi all...
Here i am once again asking for advice :)
well i need to put a file (something lika *.doc or *.rtf) on a mysql
database.
The thing is: the user need to upload a computer file to the mysql runing
over a linux box.

i would like to know:
1) what is the best way to do this?
2) what is the html code i have to generate do do this?
3) how can i read this back from the database?

i read something about sending the file over ftp and then on the database
put just the path to the file.
but what is your opinion?
thankx



***
Pedro Miguel Silva Oliveira
Cell Phone: +351 96 5867227
SMS: [EMAIL PROTECTED]
Email: [EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Insert a file in a mysql database!

2001-03-03 Thread JJeffman

Look for "load in file" on MySQL manual.

HTH.

Jayme.

-Mensagem Original-
De: Pedro M. S. Oliveira [EMAIL PROTECTED]
Para: PHP db [EMAIL PROTECTED]
Enviada em: sbado, 3 de maro de 2001 18:03
Assunto: [PHP-DB] Insert a file in a mysql database!


 Hi all...
 Here i am once again asking for advice :)
 well i need to put a file (something lika *.doc or *.rtf) on a mysql
 database.
 The thing is: the user need to upload a computer file to the mysql runing
 over a linux box.

 i would like to know:
 1) what is the best way to do this?
 2) what is the html code i have to generate do do this?
 3) how can i read this back from the database?

 i read something about sending the file over ftp and then on the database
 put just the path to the file.
 but what is your opinion?
 thankx



 ***
 Pedro Miguel Silva Oliveira
 Cell Phone: +351 96 5867227
 SMS: [EMAIL PROTECTED]
 Email: [EMAIL PROTECTED]


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]