hello
im lookin to create site with a login and user registration system like
mediafire.com
codecanyon.net

and other sites
could someone explain to me how to do it
for example if i want when users registers they upload their profile picture
meaning so im wondering how to make it in a way that someone logs in on the menu bar
they see their profile picture
and other details
so my question is where is the image stored?
also

could you give me the concepts on how to build a login system and user registration system
like the sites i mentioned
i dont want the source code just the basic concept

Recommended Answers

All 3 Replies

The basics of a login and registration are as simple as:

Username and Password are Entered > Hash and SALT > Do they match the DB values > Login or Reject

So you shall want to use a server side such as PHP and a database system such as MySQL. What you would do is do a simple check function which pulls the value from the database and compares the two Hashed and Salted (can't stress the importance of salting passwords enough) passwords together.

You mentioned how you want to display things like profile pictures. This depends on how you stored the profile images, for example if you've given them logical names (such as the username itself) then you can simple create an image tag with the username at the end such as (in PHP):

<img src = "/Assets/IMG/ProfilePics/<?php echo $_SESSION['Username']; ?>.jpg" alt = "Profile" />

This takes the stored username in the session, echos it out on the server which essentially just turns your image link into one which shall change depending on what username is stored (what user is logged in).

You could change the image name to something else, but it must relate to the profile so for example the UID is another good one to use and this saves on long filenames. Whatever you do, just make sure you use prepared statements!

That is the basics of what you want to do, I think.

Good luck and if you have any questions about your code don't forget to post what you have!

commented: +rep for prepared statements +14

could you give me the concepts on how to build a login system and user registration system

There are certain points that you might take into consider while creating your registration system:-

  • Create anti-spam log system by introducing captcha or something similar to stop spam bots to flood your site(but make sure if it is too difficult,it might also reduce traffic as people will try to ignore sites with too complex system)
  • Store username as it is(might take emailId as username so as to make sure of dupicate entry with same email ID) .
  • You can also add one more step by adding option of activation of user only once he validates his emailId(that can be done by sending activation link on his mailId .)
  • Store hash value of password.This is very sensitive data and must be taken care of.

so my question is where is the image stored?

Most Probably,you must consider storing image in folder rather than Database.Store only image location in Database,you can also append unique Id to image name as other user can also upload image with same name.Because if you save image in Database,it will be encoded in binary format and whenever you read image,it will be decoded,which will lead to slowing of your system as size increases.

meaning so im wondering how to make it in a way that someone logs in on the menu bar
they see their profile picture

For this refer comment of AHarrisGsy.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.