Office document upload to website (and inserting in MySQL if possible)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Pugi!

    Office document upload to website (and inserting in MySQL if possible)

    Hi,

    I would like to upload office-document (doc, xls, ...) using a form to a
    website (apache, php, mysql) in a specific directory and if possible insert
    it into a table (MySQL-db). Is this possible. If yes, how ? You don't have
    to explain it in detail, a link to a website or online manual or example is
    fine.

    Thanks,

    Pugi!



    Please reply to group or to pugilator at yahoo dot com


  • Marc Nadeau

    #2
    Re: Office document upload to website (and inserting in MySQL if possible)

    Pugi! a écrit:
    [color=blue]
    > Hi,
    >
    > I would like to upload office-document (doc, xls, ...) using a
    > form to a website (apache, php, mysql) in a specific directory
    > and if possible insert it into a table (MySQL-db). Is this
    > possible. If yes, how ? You don't have to explain it in
    > detail, a link to a website or online manual or example is
    > fine.
    >
    > Thanks,
    >
    > Pugi!
    >
    >
    >
    > Please reply to group or to pugilator at yahoo dot com[/color]

    It is possible to insert almost any binary document into a blob
    type field but in most case i would suggest to store the
    document outside the database and to store the *address* of the
    document into the database.

    Blobs make database less efficient due to the variation they
    introduce in field lenght.

    A blobed (?) binary document also takes more space than the
    original one.

    Bonne chance!
    --
    mv cso /dev/null
    Marc Nadeau# La Pagerie /* http://www.pagerie.com */

    Comment

    • CountScubula

      #3
      Re: Office document upload to website (and inserting in MySQL if possible)

      "Pugi!" <geenzever.pugi lator@yahoo.com > wrote in message
      news:c2ig06$1kq $1@news.worldon line.be...[color=blue]
      > Hi,
      >
      > I would like to upload office-document (doc, xls, ...) using a form to a
      > website (apache, php, mysql) in a specific directory and if possible[/color]
      insert[color=blue]
      > it into a table (MySQL-db). Is this possible. If yes, how ? You don't have
      > to explain it in detail, a link to a website or online manual or example[/color]
      is[color=blue]
      > fine.
      >
      > Thanks,
      >
      > Pugi!
      >
      >
      >
      > Please reply to group or to pugilator at yahoo dot com
      >
      >[/color]

      Just my opinion, not everything should be stuck into a db. Perhaps stick
      all the files in a directory, and rename them something uniq, and store the
      uniq file name in the db with the original file name.

      --
      Mike Bradley
      http://www.gzentools.com -- free online php tools


      Comment

      • David Quinton

        #4
        Re: Office document upload to website (and inserting in MySQL if possible)

        On Mon, 8 Mar 2004 20:02:20 +0100, "Pugi!"
        <geenzever.pugi lator@yahoo.com > wrote:
        [color=blue]
        >Hi,
        >
        >I would like to upload office-document (doc, xls, ...) using a form to a
        >website (apache, php, mysql) in a specific directory and if possible insert
        >it into a table (MySQL-db). Is this possible.[/color]

        I'm not 100% sure that I understand what you're trying to do.

        But if you want to get the *data* from Excel / Access into a MySQL
        table, then that is pretty straightforward ...
        --
        UK Computer stuff from Morgan Auctions. Bids start at £1. No reserve. Sign up NOW!
        <http://www.bizorg.co.u k/shopping/morgan.php>
        Track a Mobile phone: <http://www.bizorg.co.u k/news.html>

        Comment

        • Shawn Wilson

          #5
          Re: Office document upload to website (and inserting in MySQL ifpossible)

          "Pugi!" wrote:[color=blue]
          >
          > I would like to upload office-document (doc, xls, ...) using a form to a
          > website (apache, php, mysql) in a specific directory and if possible insert
          > it into a table (MySQL-db). Is this possible. If yes, how ? You don't have
          > to explain it in detail, a link to a website or online manual or example is
          > fine.[/color]

          Handling file uploads:


          To get the whole think into a database, you'd use the file and mysql commands,
          but the general consensus seems to be don't save binary files in the database
          unless you have a really good reason. Could you just keep the file in a non-web
          accessable folder and use something like readfile(), possibly in conjunction
          with some kind of authentication system?

          Regards,
          Shawn
          --
          Shawn Wilson
          shawn@glassgian t.com

          Comment

          • Phill

            #6
            Re: Office document upload to website (and inserting in MySQL if possible)


            "Pugi!" <geenzever.pugi lator@yahoo.com > wrote in message
            news:c2ig06$1kq $1@news.worldon line.be...[color=blue]
            > Hi,
            >
            > I would like to upload office-document (doc, xls, ...) using a form to a
            > website (apache, php, mysql) in a specific directory and if possible
            > insert
            > it into a table (MySQL-db). Is this possible. If yes, how ? You don't have
            > to explain it in detail, a link to a website or online manual or example
            > is
            > fine.
            >
            > Thanks,
            >
            > Pugi!
            >
            >
            >
            > Please reply to group or to pugilator at yahoo dot com
            >[/color]

            I think I get what you want to do, do you want to have a form on a webpage,
            where you specify the path of it on that pc, and then be able to upload it
            to a folder on the server. Then, you store the details, such as original
            filename, current filename, location etc. in the database.

            I know this is possible, but I've never managed to do it myself. Try looking
            in PHP and MySQL, it's by Larry Ullman and is published by Peachpit Press.
            There is something towards the back of the book about file uploads, and it
            gives an example of a solution like I explained above


            Comment

            Working...