Results 1 to 20 of 20

Thread: placing uploaded photos in your site
      
   

  1. #1
    dannysheps@hotmail.com is offline Second Lieutenant
    Join Date
    Feb 2008
    Posts
    138

    Default placing uploaded photos in your site

    Hello
    my site is running with information stored in DATABASE and is populated with PHP and MYSQL. http://www.brasilwebdesign.com/class...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

  2. #2
    dannysheps@hotmail.com is offline Second Lieutenant
    Join Date
    Feb 2008
    Posts
    138

    Default 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

  3. #3
    Watdaflip's Avatar
    Watdaflip is offline Major General
    Join Date
    Sep 2005
    Location
    Cincinnati, Ohio
    Posts
    2,119

    Default 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
    http://w3schools.com
    http://tizag.com

    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

  4. #4
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default 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!


  5. #5
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default 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!


  6. #6
    dannysheps@hotmail.com is offline Second Lieutenant
    Join Date
    Feb 2008
    Posts
    138

    Default Re: placing uploaded photos in your site

    wow...

    thanks alot!!

  7. #7
    dannysheps@hotmail.com is offline Second Lieutenant
    Join Date
    Feb 2008
    Posts
    138

    Default 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 ?

  8. #8
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default 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!


  9. #9
    dannysheps@hotmail.com is offline Second Lieutenant
    Join Date
    Feb 2008
    Posts
    138

    Default 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 ?

  10. #10
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default 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!


  11. #11
    dannysheps@hotmail.com is offline Second Lieutenant
    Join Date
    Feb 2008
    Posts
    138

    Default 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 ?

  12. #12
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default 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!


  13. #13
    dannysheps@hotmail.com is offline Second Lieutenant
    Join Date
    Feb 2008
    Posts
    138

    Default 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 !!

  14. #14
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default 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!


  15. #15
    dannysheps@hotmail.com is offline Second Lieutenant
    Join Date
    Feb 2008
    Posts
    138

    Default 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 ?

  16. #16
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: placing uploaded photos in your site

    What you are saying is not possible, as it does not depend on my code. Probably you have set (in the ABVFP control panel) the upload folder to be missing the : . It is not ABVFP, it is your settings. Check it.
    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!


  17. #17
    dannysheps@hotmail.com is offline Second Lieutenant
    Join Date
    Feb 2008
    Posts
    138

    Default Re: placing uploaded photos in your site

    yeah you are right...again

    but when im trying to add the ":" and save im getting an error :
    The field Mail Subject is empty !

    but with that , last time, you told me we can leave it empty

    any help ?

  18. #18
    dannysheps@hotmail.com is offline Second Lieutenant
    Join Date
    Feb 2008
    Posts
    138

    Default Re: placing uploaded photos in your site

    and can you remind me (cus i cant find that thread) how to get rid of the date day in the begining , that it will simply show me just numbers

    instead of APRIL/1/2008

    01/04/2008

    thanks

  19. #19
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: placing uploaded photos in your site

    Your needs are different than those of the normal users. So the script (which, in the man time has been updated more than 6 times!!) normally asks for an Emaill address and subject.I have told you to ONLY replace one file,you probably replaced all!! Among them the file dbts_ABVFP_formsetup.php . This is the file that performs input validation and will accept or not user (your) input. Obviously you replaced it with the uploaded version, so it gives you the error.

    However, if the script is set NOT to send email 8because you have not provided an email address) just type ANYTHING there, it is not important since no mail is sent.
    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!


  20. #20
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default Re: placing uploaded photos in your site

    $Submission_Date = date("d/m/Y");

    instead of

    $Submission_Date = date("F/d/Y");

    This thread is now closed.
    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!


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not 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