baker_hsv Posted March 24, 2006 Share Posted March 24, 2006 hi, wondering if anyone can help me. I want to make a php/mysql script where each user who logs in has a pre-paid balance and once this user purchases an item it reduces this balance.For example a user logs on to a deli site and has a prepaid balance of $30 and spends $25 the balance gets made $5. I want the balances for each user and the usernames and passwords of each user to be stored in MYSQL... any advice?and when the balance gets to 0 a restriction so the user can't order anymore until topped up.Thanks In Advance:-) Quote Link to comment https://forums.phpfreaks.com/topic/5670-prepaid-balances/ Share on other sites More sharing options...
redarrow Posted March 24, 2006 Share Posted March 24, 2006 A user logs in and then you have a link for the user to credit there account using a form.If your using paypal as the credt card handler use ipn to get a varable to update the database to insert a confirmation off credet.Then echo out the members credit that they have.As the user buys stuff show the user a deduation of the total from the money field.Then if the user credit gets to 0 echo a message your credit is o please credit your account.good luck. Quote Link to comment https://forums.phpfreaks.com/topic/5670-prepaid-balances/#findComment-20335 Share on other sites More sharing options...
redbullmarky Posted March 24, 2006 Share Posted March 24, 2006 [!--quoteo(post=358001:date=Mar 24 2006, 06:43 PM:name=redarrow)--][div class=\'quotetop\']QUOTE(redarrow @ Mar 24 2006, 06:43 PM) [snapback]358001[/snapback][/div][div class=\'quotemain\'][!--quotec--]A user logs in and then you have a link for the user to credit there account using a form.If your using paypal as the credt card handler use ipn to get a varable to update the database to insert a confirmation off credet.Then echo out the members credit that they have.As the user buys stuff show the user a deduation of the total from the money field.Then if the user credit gets to 0 echo a message your credit is o please credit your account.good luck.[/quote]redarrow, you've almost typed his entire question out changing a few of his phrases for more complex ones.baker_hsv youre pretty much asking in a forum designed to get specific tips how to construct an entire project. i'd suggest trying your best to implement what you can and coming back when you're stuck.if you're really serious about doing it yourself, then have a look here first:[a href=\"http://www.phpfreaks.com/tutorials/135/0.php\" target=\"_blank\"]http://www.phpfreaks.com/tutorials/135/0.php[/a]it's a spot on tutorial to break down and plan how your site will fit together. Quote Link to comment https://forums.phpfreaks.com/topic/5670-prepaid-balances/#findComment-20348 Share on other sites More sharing options...
baker_hsv Posted March 25, 2006 Author Share Posted March 25, 2006 ok, Thanks guys Quote Link to comment https://forums.phpfreaks.com/topic/5670-prepaid-balances/#findComment-20438 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.