I have written a small script having connectivity with postgresql which 
can upload an image and display the already uploaded images.
But it doesn't display the uploaded images. I guess the problem lies somewhere
in  $file_url.
Pls help me

$database=pg_connect("dbname=testdb user=postgres")

if ($submit) {

$result = pg_Exec($database,"INSERT INTO ".
        "images (mem_id,mem_image) VALUES(NULL,'$fupload_name')");

$file_dir = "/tmp";

$file_url = "http://sanico.sharmad.org";
if (isset($fupload ))
        if ($fupload_type == "image/jpg" ||$fupload_type == "image/jpeg")
         copy ($fupload, "$file_dir/$fupload_name") or die ("Couldn't copy");

$result=pg_Exec($database,"SELECT mem_image from images");
        copy ("$file_dir/$images",$ftupload);
        echo ( $images);
        echo ( $ftupload);
        echo ("<IMG SCR= $ftupload>");

<FORM  action="<? print $PHP_SELF?>" method="post"
<!-- <INPUT TYPE="hidden" name="MAX_FILE_SIZE" VALUE="51200"> -->
<INPUT TYPE="hidden" NAME="$fupload_name" VALUE="<? echo $fupload_name ?>">
<INPUT TYPE=file name="fupload" VALUE=""><BR>
<INPUT TYPE="submit" NAME="submit" VALUE="Send File to Web Server">
<A HREF="index.php" CLASS="content">Home page</A>

The secret of the universe is @*&í!'ñ^#+ NO CARRIER
__    _  _      _  _
|_|_||_||_||\/||_|| \
_|| || || \|  || ||_/

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]

Reply via email to