Re: [PHP] Uploaded CSV -> database

2005-10-18 Thread Brian Dunning
Amazing - it works! The uploaded file is always stored in the temp directory, so that issue was kind of moot. Here's my complete code, if anyone else has this same need: if(isset($_FILES['userfile']['tmp_name'])) { $csvfile = fopen($_FILES['userfile']['tmp_name'], "r"); if($csvfile ==

Re: [PHP] Uploaded CSV -> database

2005-10-18 Thread Mark Rees
rom disk style operation. > > Ben > > On Mon, 17 Oct 2005 11:45:04 -0400, Jim Moseby <[EMAIL PROTECTED]> > wrote: > > >> -Original Message- > >> From: Brian Dunning [mailto:[EMAIL PROTECTED] > >> Sent: Monday, October 17, 2005 11:39 AM > >> To: ph

Re: [PHP] Uploaded CSV -> database

2005-10-17 Thread Ben Litton
rom: Brian Dunning [mailto:[EMAIL PROTECTED] Sent: Monday, October 17, 2005 11:39 AM To: php-general@lists.php.net Subject: Re: [PHP] Uploaded CSV -> database It looks like all of those tips will easily cover me for the latter half of the operation. Any tips on how to get the uploaded CSV file into

RE: [PHP] Uploaded CSV -> database

2005-10-17 Thread Jim Moseby
> -Original Message- > From: Brian Dunning [mailto:[EMAIL PROTECTED] > Sent: Monday, October 17, 2005 11:39 AM > To: php-general@lists.php.net > Subject: Re: [PHP] Uploaded CSV -> database > > > It looks like all of those tips will easily cover me for the latte

RE: [PHP] Uploaded CSV -> database

2005-10-17 Thread Jay Blanchard
[snip] It looks like all of those tips will easily cover me for the latter half of the operation. Any tips on how to get the uploaded CSV file into memory in order to attack it with fgetcsv()? I'd rather not ever have to actually write the file to the server's disk. [/snip] Once you have per

Re: [PHP] Uploaded CSV -> database

2005-10-17 Thread Brian Dunning
It looks like all of those tips will easily cover me for the latter half of the operation. Any tips on how to get the uploaded CSV file into memory in order to attack it with fgetcsv()? I'd rather not ever have to actually write the file to the server's disk. Thanks! -- PHP General Mailing

RE: [PHP] Uploaded CSV -> database

2005-10-17 Thread Jim Moseby
> -Original Message- > From: Mark Rees [mailto:[EMAIL PROTECTED] > Sent: Monday, October 17, 2005 11:11 AM > To: php-general@lists.php.net > Subject: Re: [PHP] Uploaded CSV -> database > > > > > -Original Message- > > > From: Jim M

Re: [PHP] Uploaded CSV -> database

2005-10-17 Thread Mark Rees
> > -Original Message- > > From: Jim Moseby [mailto:[EMAIL PROTECTED] > > Sent: Monday, October 17, 2005 10:41 AM > > To: 'Brian Dunning'; php-general@lists.php.net > > Subject: RE: [PHP] Uploaded CSV -> database > > > > > > &

RE: [PHP] Uploaded CSV -> database

2005-10-17 Thread Jim Moseby
> -Original Message- > From: Jim Moseby [mailto:[EMAIL PROTECTED] > Sent: Monday, October 17, 2005 10:41 AM > To: 'Brian Dunning'; php-general@lists.php.net > Subject: RE: [PHP] Uploaded CSV -> database > > > > -Original Message- > >

RE: [PHP] Uploaded CSV -> database

2005-10-17 Thread Jim Moseby
> -Original Message- > From: Brian Dunning [mailto:[EMAIL PROTECTED] > Sent: Monday, October 17, 2005 10:37 AM > To: php-general@lists.php.net > Subject: [PHP] Uploaded CSV -> database > > > Does anyone have an example of code to process a CSV file submitte

[PHP] Uploaded CSV -> database

2005-10-17 Thread Brian Dunning
Does anyone have an example of code to process a CSV file submitted via a file upload and parse it out in order to write its records to a db? Hopefully yours, - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php