Building an E-Commerce Site Part 2: Managing Users with Sessions - Step 7: Putting It All Together
(Page 10 of 10 )
We've covered the sessions as well as user management. We've also gone over the changes that have happened since part 1 of this guide. Now let's put everything together. Open up mymarket/ with your browser and you should see the (boring) home page. Now click on the "login" link and sign on as:
username: root
password: password
First thing you should do is change your password! Next, go to the administrative home page and create a new user account (that doesn't have the "admin" privilege). Note you should specify a real email address when doing this because the password is going to get sent to that email address.
TROUBLESHOOTING EMAIL: If your PHP4 refuses to send email, make sure the settings in the [mail function] section of your php.ini are correct.
Now log out and try to access the administrative pages in mymarket/admin, notice that it asks you to login first. Neat-o isn't it :) Okay, just keep playing with the system until you're comfortable with it.
As always, go over the code and comments while you play with the system to get a good feel for what is happening. Stay tuned for the next part where we look at letting customers (regular users) to look through the product catalog and order things!
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |