Well, you could set the database (whatever you have now) so that when the user orders something, it creates a section in your database, and adds his stuff in it. This should be done on registry, though. When the user wants to see their stuff, just make a link like:
http://www.example.com/userorders?userID=1337
And if that user's ID is 1337 (  ) then it displays his stuff. But if the user decides to edit the URl, and types
http://www.example.com/userorders?userId=666
Then it will ask for user # 666 (  )'s password to view it.
So basically;
if user is logged in, give link to order page
else if user is not logged in, do not show link.
else if userID == userID (the one in the URL) show orders page
else if userID != userID (the URL one) do not show orders page
else if userID == userID but password = false; echo "did you forget your password?";
Stuff like that?
Last edited by Physicsguy; 10-18-2009 at 07:34 PM..
|