Script to upload images and add to database?

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default Script to upload images and add to database?

    Is there a script that will allow upload of multiple images at once to
    a FTP server, and simultaneously write that list to a MySQL table? I
    need to allow users to do something like this.

    Thanks.
    jmev7 Guest

  2. Similar Questions and Discussions

    1. Images upload
      Hi to all of you. I need to be able to upload any kind of images in one of the pages of my website whem I'm connected from a pc that's not mine....
    2. Upload images ???
      Hi! My client want to have an option to upload images to his website, without third party involvement. I have looked for the solution all around,...
    3. a Free way to upload database images?
      Hello stuff that dreamweavers are made of. Im trying endlessly to search for ways to upload images from my .asp pages using JS into a database. ...
    4. form upload images using php form script
      Hi, I normally use CGI to process my html forms. However, this time I need/want to use PHP. Can anyone point me in the direction of a php...
    5. Upload images to Access database
      How can I easy upload picture to an MS access database.
  3. #2

    Default Re: Script to upload images and add to database?

    jmev7 wrote:
    > Is there a script that will allow upload of multiple images at once to
    > a FTP server, and simultaneously write that list to a MySQL table? I
    > need to allow users to do something like this.
    I doubt it very much.
    Probably the best approximation you'll be able to dig out
    will upload the multiple files *sequentially*.

    Apart from that, yes, I'm pretty sure there is.

    --
    I have a spam filter working.
    To mail me include "urkxvq" (with or without the quotes)
    in the subject line, or your mail will be ruthlessly discarded.
    Pedro Guest

  4. #3

    Default Re: Script to upload images and add to database?

    Pedro <hexkid@hotpop.com> wrote in message news:<bnpg41$148ntn$2@ID-203069.news.uni-berlin.de>...
    > jmev7 wrote:
    > > Is there a script that will allow upload of multiple images at once to
    > > a FTP server, and simultaneously write that list to a MySQL table? I
    > > need to allow users to do something like this.
    >
    > I doubt it very much.
    > Probably the best approximation you'll be able to dig out
    > will upload the multiple files *sequentially*.
    >
    > Apart from that, yes, I'm pretty sure there is.
    Actually, sequentially makes sense. I don't mind limiting myself to,
    say, 5 textboxes with "browse" buttons next to them. Then, the user
    selects 1-5 images, clicks "UPLOAD" (or submit, or whatever), and the
    upload begins, with the SQL statement to follow. I can figure out the
    SQL statement (I think) better than I can the array to step through.

    Any suggestions on code to lookup?

    Thanks
    jmev7 Guest

  5. #4

    Default Re: Script to upload images and add to database?

    Op 3 Nov 2003 07:17:38 -0800 schreef [email]jmev7@yahoo.com[/email] (jmev7):
    >Actually, sequentially makes sense. I don't mind limiting myself to,
    >say, 5 textboxes with "browse" buttons next to them. Then, the user
    >selects 1-5 images, clicks "UPLOAD" (or submit, or whatever), and the
    >upload begins, with the SQL statement to follow. I can figure out the
    >SQL statement (I think) better than I can the array to step through.
    I think this script is what your looking for
    [url]http://www.techtronix.be/demos/im/index2.php[/url]

    username: demo
    password: demo


    Clubberboy Guest

  6. #5

    Default Re: Script to upload images and add to database?

    [email]jmev7@yahoo.com[/email] (jmev7) wrote in message news:<c72a6456.0311030717.2e8cd97a@posting.google. com>...
    > Pedro <hexkid@hotpop.com> wrote in message news:<bnpg41$148ntn$2@ID-203069.news.uni-berlin.de>...
    > > jmev7 wrote:
    > > > Is there a script that will allow upload of multiple images at once to
    > > > a FTP server, and simultaneously write that list to a MySQL table? I
    > > > need to allow users to do something like this.
    > >
    > > I doubt it very much.
    > > Probably the best approximation you'll be able to dig out
    > > will upload the multiple files *sequentially*.
    > >
    > > Apart from that, yes, I'm pretty sure there is.
    >
    > Actually, sequentially makes sense. I don't mind limiting myself to,
    > say, 5 textboxes with "browse" buttons next to them. Then, the user
    > selects 1-5 images, clicks "UPLOAD" (or submit, or whatever), and the
    > upload begins, with the SQL statement to follow. I can figure out the
    > SQL statement (I think) better than I can the array to step through.
    >
    > Any suggestions on code to lookup?
    >
    > Thanks
    Hi, First are you sure you wanna to use FTP, I think the best way is
    to use file upload build in in PHP or/and use GD2 wich is comes with
    php latest versions
    Here some exampe how to upload one photo :

    if (is_uploaded_file($_FILES['photo']['tmp_name'])) {

    $imtype=$_FILES["photo"]["type"];
    $imsize=$_FILES["photo"]["size"];
    $imname=$_FILES["photo"]["name"];
    $imtemp=$_FILES['photo']['tmp_name'];

    $im = add_image($imtype , $title, $description, $sub_cat)
    or die("couldnt add photo");
    move_uploaded_file($imtemp, "im1/$im.$extension");

    where function add_image adding imaage to DB!
    If you wanna to add multi. immages just use for()....


    Check my web site:
    [url]http://haifa.us[/url]
    Bob Guest

  7. #6

    Default Re: Script to upload images and add to database?

    Hi, I think I follow this code, but as a newbie to PHP, not for sure.
    Is this all I'll need, or do I need to write an "add_image()" function
    to write to the database. If so, I'll have to stay up late figuring
    out the first line :)

    Thanks
    > Hi, First are you sure you wanna to use FTP, I think the best way is
    > to use file upload build in in PHP or/and use GD2 wich is comes with
    > php latest versions
    > Here some exampe how to upload one photo :
    >
    > if (is_uploaded_file($_FILES['photo']['tmp_name'])) {
    >
    > $imtype=$_FILES["photo"]["type"];
    > $imsize=$_FILES["photo"]["size"];
    > $imname=$_FILES["photo"]["name"];
    > $imtemp=$_FILES['photo']['tmp_name'];
    >
    > $im = add_image($imtype , $title, $description, $sub_cat)
    > or die("couldnt add photo");
    > move_uploaded_file($imtemp, "im1/$im.$extension");
    >
    > where function add_image adding imaage to DB!
    > If you wanna to add multi. immages just use for()....
    >
    >
    > Check my web site:
    > [url]http://haifa.us[/url]
    jmev7 Guest

  8. #7

    Default Re: Script to upload images and add to database?

    Hi
    First:

    if (is_uploaded_file($_FILES['photo']['tmp_name'])) {
    This line checks if you already have this image!

    Second: The pictures will be stored on your server,if that what you
    need! You may store your photos in DB as blob!

    this function will add file, name, ... to db:

    function add_image($file, $title, $description, $uid, $jid, $pswd) {
    $query="INSERT INTO t_images .......";
    execution....
    }




    [email]jmev7@yahoo.com[/email] (jmev7) wrote in message news:<c72a6456.0311121156.2bd853b9@posting.google. com>...
    > Hi, I think I follow this code, but as a newbie to PHP, not for sure.
    > Is this all I'll need, or do I need to write an "add_image()" function
    > to write to the database. If so, I'll have to stay up late figuring
    > out the first line :)
    >
    > Thanks
    > > Hi, First are you sure you wanna to use FTP, I think the best way is
    > > to use file upload build in in PHP or/and use GD2 wich is comes with
    > > php latest versions
    > > Here some exampe how to upload one photo :
    > >
    > > if (is_uploaded_file($_FILES['photo']['tmp_name'])) {
    > >
    > > $imtype=$_FILES["photo"]["type"];
    > > $imsize=$_FILES["photo"]["size"];
    > > $imname=$_FILES["photo"]["name"];
    > > $imtemp=$_FILES['photo']['tmp_name'];
    > >
    > > $im = add_image($imtype , $title, $description, $sub_cat)
    > > or die("couldnt add photo");
    > > move_uploaded_file($imtemp, "im1/$im.$extension");
    > >
    > > where function add_image adding imaage to DB!
    > > If you wanna to add multi. immages just use for()....
    > >
    > >
    > > Check my web site:
    > > [url]http://haifa.us[/url]
    Bob Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139