Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    May 2011
    Posts
    2
    Member #
    27861
    Hi,

    I'm making a website for a friend and he wants to be able to update it by himself. So i decided to include a very simple CMS to it so he can log in as the admin, manage all the news and add new images to the gallery.

    So far, I've done all that except the part about adding new images. I'm not sure how to proceed with uploading images and where would they be stocked? In the database or in a folder on the server?

    Any help or ideas would be very appreciated or if anyone knows about a good tutorial explaining how to do it, just let me know.

    Thank you!

  2.  

  3. #2
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,482
    Member #
    425
    Liked
    2784 times
    I can't think of a tutorial because I've been doing it my own way for years now. But here's how I do it:

    1) I use either ASP.net's built-in uploading functionality or classic ASP to allow the file to be uploaded.

    2) I check to make sure it's a valid image, just to avoid people uploading executables and things like that.

    3) I store the image in a server folder and extract its filename, width and height.

    4) I store all three in the database.

    You want the width and height to ensure that your pictures are sized correctly across all browsers, and it's less resource-intensive to store this info in a database than it is to retrieve it on the fly.
    seventhson likes this.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  4. #3
    Junior Member
    Join Date
    May 2011
    Posts
    2
    Member #
    27861
    Thank you very much!! That's exactly what I needed to know.

    Although I've never used ASP.net, I think it shouldn't be too hard to do that with PHP now that I know the steps to follow.

    Again, thank you!

  5. #4
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,482
    Member #
    425
    Liked
    2784 times
    No probs, man. Glad you got an idea you can run with.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:25 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com