php - Connecting to two Database tables and updating both -


i'm trying connect 2 databases, reason because creating redeem code system. once has brought me paypal. redeem code (i give them), once type redeem code

1) updates mysql changing (the table redeem)

code | prize | expired | used_by | 

to

code | prize | 0 | $_session['username'] 

if expired = 0 code no longer active if equals 1 active. if redeem code updates expired = 1 , cannot used. updated user table , set credits+prize.

anybody know how it?

with php,

thanks, hope can help!

try connection this

 $link=mysql_connect("server", "username", "password");  mysql_select_db("db_name");  

then queries , close connection code

 mysql_close($link); 

and same other database


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -