placing uploaded photos in your site

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • dannysheps@hotmail.com
    Second Lieutenant

    • Feb 2008
    • 138

    placing uploaded photos in your site

    Hello
    my site is running with information stored in DATABASE and is populated with PHP and MYSQL. https://www.brasilwebdesign.com/clas...assifieds.html

    is there a way with ABVFP to let the user upload a photo with the rest of the information and when it showing(quering ) the information back to the page it will quuer the uploaded photo as well ?

    im asking that because i understand that the up loaded photo is going to a folder (uploaded) and not to the database

    thanks alot
  • dannysheps@hotmail.com
    Second Lieutenant

    • Feb 2008
    • 138

    #2
    Re: placing uploaded photos in your site

    a bit more....
    now i understand that it IS better to store in the database only the "link" (the address) of the folder that contains the pictures.

    how do i do that ? how can i add to the form php code the command to open a new colum (pic_location) that when i want to queir the users information it will automaticly show the pics in the page also

    thanks again

    Comment

    • Watdaflip
      Major General

      • Sep 2005
      • 2116

      #3
      Re: placing uploaded photos in your site

      Actually if the file sizes are small you could also store them in a database, but thats too in depth to give instruction for that on the forum.

      I can't really say how you will do this with ABVFP, I am not familiar with the inner workings of that script, but basically when you upload a file a function is called to move the file from the temporary location the upload is stored, to some location on your webspace to be saved for later use. You just have to save that file path in the database for it can later be retrieved.

      I don't believe ABVFP has a feature to display the data from the database (although I could be wrong, as I said I have never used it). You may want to spend some time learning how to query a database for data and display it.
      check out
      W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.


      Register/Login Script
      Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

      Comment

      • navaldesign
        General & Forum Moderator

        • Oct 2005
        • 12080

        #4
        Re: placing uploaded photos in your site

        Since ABVFP was not planned to do what you want (the next version will have as User Options: Email the files, Email only the path to the files, Store the files in the Database, Store the Path to the files ) you should modify its code. Find this line:

        for ($i = 0; $i < (count($ndfieldname) - count($upload_Name)); $i++) {

        and make it:


        for ($i = 0; $i < (count($ndfieldname)); $i++) {


        This should be enough. The value stored in the database will be the full path (URL) of the uploaded files.
        Navaldesign
        Logger Lite: Low Cost, Customizable, multifeatured Login script
        Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
        DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
        Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

        Comment

        • navaldesign
          General & Forum Moderator

          • Oct 2005
          • 12080

          #5
          Re: placing uploaded photos in your site

          To display the images, you have two options:

          1. Retrieve the data from the database as string, and simply echo the string. This will allow you to display the image excactly in it's original dimensions.

          2. OR, use a resizing script to define allowable maximum dimensions, and have the script resize and display the pictures in the desired dimensions.
          Navaldesign
          Logger Lite: Low Cost, Customizable, multifeatured Login script
          Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
          DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
          Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

          Comment

          • dannysheps@hotmail.com
            Second Lieutenant

            • Feb 2008
            • 138

            #6
            Re: placing uploaded photos in your site

            wow...

            thanks alot!!

            Comment

            • dannysheps@hotmail.com
              Second Lieutenant

              • Feb 2008
              • 138

              #7
              Re: placing uploaded photos in your site

              hi again
              did what u said
              and in the DB colum it still shows "NULL"
              i named the upload box "upload" i see a colum named "uipload"
              but now path to the file there

              any help ?

              Comment

              • navaldesign
                General & Forum Moderator

                • Oct 2005
                • 12080

                #8
                Re: placing uploaded photos in your site

                Please note that the line to edit exists in two locations, you need to edit it in both. Change it and try again.
                Navaldesign
                Logger Lite: Low Cost, Customizable, multifeatured Login script
                Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                Comment

                • dannysheps@hotmail.com
                  Second Lieutenant

                  • Feb 2008
                  • 138

                  #9
                  Re: placing uploaded photos in your site

                  found the two...
                  changed them

                  and nop it still show's NULL in the "upload" colum

                  the colum feild :
                  feild : upload
                  type :VARCHAR
                  lenght/value : 250
                  Null :null
                  Default :NULL

                  maybe we need to add/change other things ?

                  Comment

                  • navaldesign
                    General & Forum Moderator

                    • Oct 2005
                    • 12080

                    #10
                    Re: placing uploaded photos in your site

                    No. This is tested and works. Please wait 5 minutes and then download again the entire ABVFP zip. replace the file dbts_abvfp.php with the new one, and test again.
                    Navaldesign
                    Logger Lite: Low Cost, Customizable, multifeatured Login script
                    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                    Comment

                    • dannysheps@hotmail.com
                      Second Lieutenant

                      • Feb 2008
                      • 138

                      #11
                      Re: placing uploaded photos in your site

                      browse button HTML :
                      <input type="file" id="FileUpload1" size="27" name="upload">

                      submit button HTML:
                      <input type="submit" id="Button2"" name="submit" value="submit">

                      MAYBE HERE IT WRONG ?

                      Comment

                      • navaldesign
                        General & Forum Moderator

                        • Oct 2005
                        • 12080

                        #12
                        Re: placing uploaded photos in your site

                        How you have named your fields is NOT important. ABVFP automatically recognizes the fields and creates the necessary DB columns.

                        Did you download the zip again, and replaced the file, as i suggested ?
                        Navaldesign
                        Logger Lite: Low Cost, Customizable, multifeatured Login script
                        Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                        DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                        Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                        Comment

                        • dannysheps@hotmail.com
                          Second Lieutenant

                          • Feb 2008
                          • 138

                          #13
                          Re: placing uploaded photos in your site

                          hi
                          yeap i did what u told me , ITS WORKING FINE now

                          just one questiuon ,

                          how come now i didnt see the two location that i neede dto change the line code ?


                          anyways , thanks alot !!

                          Comment

                          • navaldesign
                            General & Forum Moderator

                            • Oct 2005
                            • 12080

                            #14
                            Re: placing uploaded photos in your site

                            Because when i posted the above post, i edited the code myself and uploaded it, so the code you got was already edited.
                            Navaldesign
                            Logger Lite: Low Cost, Customizable, multifeatured Login script
                            Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                            DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                            Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                            Comment

                            • dannysheps@hotmail.com
                              Second Lieutenant

                              • Feb 2008
                              • 138

                              #15
                              Re: placing uploaded photos in your site

                              hi
                              i found a bug in your new code
                              it put in the DB the path but with out ":" after http

                              and when i echoing the image it doesnt work

                              can we fix it ?

                              Comment

                              Working...
                              X