by forme
1 replies
Hey programming warriors,
Please give me a quick and simple to understand reply.
I'm doing a test web project(not on my web space but with localhost(xampp) ), a "login system". I've done the database connection things and queries. But I want to give the option to upload a photo when users register( I have inserted this in my registration form:- <input type="file" name="somename" /> ) on my website . I've heard that there're two options to do this,
(1) upload the photo directly to the database.
(2) upload the photo to a folder and store only the path in the database.
I don't know whether it is possible to do it on localhost, if it's possible, please tell me how to do it the 2nd way.
Thanks all and hope a best method to do it.
#hard #mysql #php #time #web form problems #website
  • Profile picture of the author chretit
    Hey, forme
    Please give me a quick and simple to understand reply.
    You've asked a complex question. May I suggest googling: php upload photo code

    I just did and here are the top two results that I see:
    PHP File Upload
    Php script for upload photos | DaniWeb

    (Have a look at the second one, in particlular, it illustrates that the code isn't trivial enough to be able to answer in this thread in this forum.)

    If you're still learning PHP, you'll need to study that script to understand how it works. It does store only the path in the database.

    And you certainly can do all that on localhost.

    Post back, if you're still unclear about anything
    {{ DiscussionBoard.errors[7126849].message }}

Trending Topics