•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 361,555 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,071 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 215 | Replies: 4
![]() |
•
•
Join Date: May 2008
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
Hey all,
I'm looking at building a website that allows photographers to login and upload images to galleries, while another type of user can signup and buy images from those photographers. The problem is I've come up against my age-old rival.
I haven't been able to get my head around how to create user accounts and this is obviously something I need to master. It's the passing of data through sessions or cookies that I've never mastered, so that when a user logs into their account they view only their details, and when they order something it's tagged against their profile etc.
Does anyone know of some good reading material on this topic (preferably free), or example code or something? Maybe someone can walk me through it?
I have a couple of great ideas for websites and not knowing how to do this is my stumbling block on all of them. Please help me master it!
I'm looking at building a website that allows photographers to login and upload images to galleries, while another type of user can signup and buy images from those photographers. The problem is I've come up against my age-old rival.
I haven't been able to get my head around how to create user accounts and this is obviously something I need to master. It's the passing of data through sessions or cookies that I've never mastered, so that when a user logs into their account they view only their details, and when they order something it's tagged against their profile etc.
Does anyone know of some good reading material on this topic (preferably free), or example code or something? Maybe someone can walk me through it?
I have a couple of great ideas for websites and not knowing how to do this is my stumbling block on all of them. Please help me master it!
I would suggest you purchase a book on PHP. An excellent book is PHP and MySQL for Dynamic Web Sites :
http://www.amazon.com/PHP-MySQL-Dyna.../dp/0321336577
It gives you all the basics you need to know and there is an example at the back explaining how you can create a member only area.
Regards,
Alex.
http://www.amazon.com/PHP-MySQL-Dyna.../dp/0321336577
It gives you all the basics you need to know and there is an example at the back explaining how you can create a member only area.
Regards,
Alex.
If you find my post useful please add to my reputation!! Thanks!
ajtrichards web solutions
http://www.ajtrichards.co.uk
ajtrichards web solutions
http://www.ajtrichards.co.uk
•
•
Join Date: May 2008
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
•
•
•
•
I would suggest you purchase a book on PHP. An excellent book is PHP and MySQL for Dynamic Web Sites :
http://www.amazon.com/PHP-MySQL-Dyna.../dp/0321336577
It gives you all the basics you need to know and there is an example at the back explaining how you can create a member only area.
Regards,
Alex.
Thanks for your response Alex. I have actually purchased and completed such a book already - which is where my understanding and use of PHP has come from to date.
Is there anything a bit more specific out there that focuses soley on this area of the topic?
Rayhan, yes, usernames and passwords are stored in the database.
Thanks for your help
Greg
You can pass data between pages either using sessions or cookies,
In the database you would need to have another column along with the username and password for the user level or status.
The simplest way to have user level restrictions would be to have tiers, for example, photographers are level 1, users are level 2, these would need to be sequential. And in the code check the users level field in the DB to see if they have permission to access the page. Level 1 would be able to get to anything for 1 and higher, level 2 for 2 and higher etc..
Have a look on Google, there are alot of articles on this subject. As well as sessions and cookies.
In the database you would need to have another column along with the username and password for the user level or status.
The simplest way to have user level restrictions would be to have tiers, for example, photographers are level 1, users are level 2, these would need to be sequential. And in the code check the users level field in the DB to see if they have permission to access the page. Level 1 would be able to get to anything for 1 and higher, level 2 for 2 and higher etc..
Have a look on Google, there are alot of articles on this subject. As well as sessions and cookies.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
access activation api blogger blogging blogs code code injection combo dani daniweb data debugging development dreamweaver dropdownlist epilepsy gdata google gpl griefers hackers html innovation javascript key linux microsoft module net news openbsd product programming reuse rss serial source tags vista web wysiwyg xml
- memory management in wndows 2000 (Windows NT / 2000 / XP / 2003)
Other Threads in the PHP Forum
- Previous Thread: PHP Custom CMS; Need Help With Multiple Paragraph Tags
- Next Thread: problem with sending variable in php


Linear Mode