Help with PHP pls

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
afam4eva
Forum Newbie
Posts: 5
Joined: Tue Oct 27, 2009 12:54 pm

Help with PHP pls

Post by afam4eva »

Pls can anyone direct me on how to create a user account for a customer. For example i want know if i need to use the "create databse" and create "user identified by ''" for each customer. what objects do i need to create
User avatar
akuji36
Forum Contributor
Posts: 190
Joined: Tue Oct 14, 2008 9:53 am
Location: Hartford, Connecticut

Re: Help with PHP pls

Post by akuji36 »

Hello

You'll need at least 1 database and 2 tables.

table 1 will have fields like user id#(this will be your primary key),

name, address, ssn#, visa# and expiration date.

The second table will contain your products and have fields

like product id#(primary key), description, quantity, and color.

Primary key --this is the field which gives your item a unique no#
in the database and makes it easy to reference. Note that a
first or last name is not used as a primary key because
there may be 2 or more people in your db with the same last
or first name.

Here's a link for xampp-- a combination of php, mysql,
apache(your web server) and phpmyadmin(interface for mysql and php).

http://www.apachefriends.org/en/xampp-windows.html

and here's link for php and mysql video tutorials.

http://www.phpvideotutorials.com/free

and

http://www.learningnerd.com/

thanks

Rod
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: Help with PHP pls

Post by califdon »

Just a word about storing other people's credit card info in your database: be v-e-r-y careful! You might place yourself in a most vulnerable legal position if your database is compromised! At the very least, such data should never be stored unencrypted, and I would strongly advise against storing it in your database at all. There are plenty of professionally programmed secure sites that can be used for online payments. Unless you have that level of programming skill, you are only setting yourself up for an expensive lawsuit that could ruin you financially.
afam4eva
Forum Newbie
Posts: 5
Joined: Tue Oct 27, 2009 12:54 pm

Re: Help with PHP pls

Post by afam4eva »

Thanks guys.....does it mean that i don't need to create a database for each user cos i want to create a member area where they can edit their profile, view new invoices and submit tickets.
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: Help with PHP pls

Post by califdon »

A database should contain ALL of the data related to a single application. Within that one database, there should be one table for each "entity". A table is a collection of records, each describing one instance of that entity. If the entity is "users", for example, each record in the table represents one of the users. If the entity represented invoices, each record in the table would represent one invoice; if the entity represented products, each record in the table would represent one product. Use a search engine and search terms database relational tutorial beginning.
Post Reply