PDA

View Full Version : PHP check pin and insert values to MySQL



ckevin
January 9th, 2002, 09:34
I have a member database, I wish to make use of PIN code and when member can enter the PIN code, one of the member field value can be added such as:

My PIN : 12345

(1) After login, when my member enter this PIN code (12345)

(2) the PHP scripts would check if it is valid in the text database (each line for one PIN) OR MySQL database

(3) if valid, the PHP would automatically insert a value (example 10) to one of the fields in the member database

(4) if there is currently an existing value (eg 5), then add up this value (10 + 5), and 15 would be the new value.

Any suggestion/hints on how the PHP works?

Thanks,

Kevin

gyrbo
January 9th, 2002, 11:16
Shouldn't be too hard, but I don't rerally get the use, and what value needs to be added. And does it invlove usernames too?

ckevin
January 9th, 2002, 11:42
I don't rerally get the use

When the customer paid via credit card (eg $10), he got a PIN, when the PIN match, a fixed value (e.g. 10) can added to the database, so much clear? :)

gyrbo, yeah it involves username and the difficult part is access level, only admin level can add the money value in my existing database, so the whole process I wish is:

(1) Member logged in and fill in the PIN (suggested value pairs ~ id : "MemberID" and PIN : "PIN Code")
(2) PHP at background as admin --- add up the value and delete that PIN in the PIN list (suggested value pairs ~ mode : change_funds, id : "MemberID" and sum : "eg. 10")
(3) Display the value "added" notice to the member.

I hope it's not that hard, any advice? Thanks :)

Kevin

Mekhu
January 9th, 2002, 16:23
phpbuilder.net.

What I recommend considering you sound somewhat new to php, like myself is to head over to that site and check out the articles, tutorials, and forums.

What I found that seemed to work was consider projects that other people do, and look at their code and then try and apply it to your situation.

I would try and give you some examples, but at the moment I think I am a little ameteur to be offering advice :D

Mekhu