Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Senior Coder
    Join Date
    Jun 2008
    Location
    Cornwall
    Posts
    2,099
    Thanks
    297
    Thanked 12 Times in 12 Posts

    Exclamation creating a credit system for my users

    Hi All,

    I am creating a website where people will be able to register and post "events" (jobs, accommodation etc) in my local area.

    I was thinking of having a credit system where by i would give all new users say 10 credits as a thankyou for signing up then each "event" they post on the site will cost a certain amout of credits.

    So if the user wants an event listed for 1 week that could be 10 credits say. then they would need to buy more credits if they wanted to create further"events" or extend the length of the current "event".

    I would use paypal for this as i wont have to store any card details in my database and is a safer option.

    thats the idea, so my question is what is the best way to approach this? what tables would i need?

    Im thinking something along these lines

    tbl_users(userID, username, currentcredits, datejoined)
    tbl_events(eventID, userID)
    transactions(transaction_id, userID, credits, timestamp)
    transactions_types(transaction_id, type) => type(brought/spent)
    transactions_items(transaction_id, item) => item(purchased credits or event id)

    the more i think about this the harder it sounds in my head

    appreciate any help/advice

    Luke
    Last edited by LJackson; 02-13-2014 at 08:44 PM.

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    Again, NOTHING to do with PHP. Moving to other databases.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)

  • #3
    New to the CF scene
    Join Date
    Feb 2014
    Location
    Norway
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    veldig bra

    Takk for interessant informasjon


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •