I'm trying to connect too two databases, the reason for this is because I am creating a redeem code system. Once somebody has brought something from me with paypal. They get a redeem code (I give them), then once they type the redeem code
1) It updates MySQL Changing (The Table Redeem)
CODE | PRIZE | EXPIRED | USED_BY |
To
CODE | PRIZE | 0 | $_SESSION['username']
If Expired = 0
code is no longer active if It equals 1 it is active.
If they successfully redeem the code It updates EXPIRED = 1
and cannot be used. It also updated User
table and set credits+PRIZE
.
Anybody know how to do it?
With PHP,
Thanks, Hope you can help!