fcooper94 Posted October 13, 2011 Share Posted October 13, 2011 Hey Guys I need some help, I have these two tables: (vouchers) (login) I also, have this page. (redeem.php) What i need, is when a user types in a voucher code, i adds 100 credits to there user account. My Logged in Session is currently: $username = $_SESSION['loggedinsuccesfully']; Also, when the voucher has been used, the status of the voucher needs to change to 1 (means it cant be used again) If anyone can offer me this code, i will appreciate it. Thanks again fCooper94 Quote Link to comment https://forums.phpfreaks.com/topic/249027-mysql-help/ Share on other sites More sharing options...
trq Posted October 13, 2011 Share Posted October 13, 2011 We don't supply code for people. What exactly is the issue? Quote Link to comment https://forums.phpfreaks.com/topic/249027-mysql-help/#findComment-1278957 Share on other sites More sharing options...
AyKay47 Posted October 13, 2011 Share Posted October 13, 2011 insert and update queries.. Quote Link to comment https://forums.phpfreaks.com/topic/249027-mysql-help/#findComment-1278959 Share on other sites More sharing options...
Muddy_Funster Posted October 13, 2011 Share Posted October 13, 2011 We don't supply code for people.... Technicaly we do...but we also expect payment up front Quote Link to comment https://forums.phpfreaks.com/topic/249027-mysql-help/#findComment-1278971 Share on other sites More sharing options...
PFMaBiSmAd Posted October 13, 2011 Share Posted October 13, 2011 So, is the voucherid in any way related to the ID value? Your login code should store both the username and the user id in session variables so that your code can operate the most efficiently (using a numeric id in queries to match up information is much faster than using a multiple character username string.) Quote Link to comment https://forums.phpfreaks.com/topic/249027-mysql-help/#findComment-1278974 Share on other sites More sharing options...
fcooper94 Posted October 13, 2011 Author Share Posted October 13, 2011 No, The ID is not Linked to the VoucherID If there is a change i am willing to pay a small amount thanks Quote Link to comment https://forums.phpfreaks.com/topic/249027-mysql-help/#findComment-1279000 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.