Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id A97324761ED for ; Thu, 7 Nov 2002 23:31:56 -0500 (EST) Received: from hotmail.com (f90.law12.hotmail.com [64.4.19.90]) by postgresql.org (Postfix) with ESMTP id 06E72475ED4 for ; Thu, 7 Nov 2002 23:31:56 -0500 (EST) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Thu, 7 Nov 2002 20:32:00 -0800 Received: from 128.123.37.105 by lw12fd.law12.hotmail.msn.com with HTTP; Fri, 08 Nov 2002 04:32:00 GMT X-Originating-IP: [128.123.37.105] From: "Zhidian Du" To: pgsql-php@postgresql.org Subject: Are these steps correct and standard way to upload images into a table? Date: Thu, 07 Nov 2002 21:32:00 -0700 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 08 Nov 2002 04:32:00.0849 (UTC) FILETIME=[C7D8AC10:01C286DF] X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/30 X-Sequence-Number: 1612 I check the posts about uploading images from browser. No one give me a whole procedure how to do it. My friend told me I can upload binary/image file using following steps: I want to know are these steps standard steps that insert images into a table? Step 1 upload it
upload
Step 2 Read it $fd = fopen($img_name, "r"); while ($post_file = fread($fd, 4096)) { $filestuff .= $post_file; } fclose($fd); Step 3 insert or update into the table using insert or update Are these steps correct or the standard way to upload images into a table? Thanks. Zhidian Du _________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963