bschultz Posted June 7, 2007 Share Posted June 7, 2007 I need to write an authentication script. Here are the details: I run a site that streams audio broadcasts of college sports games. The listener needs to purchase the subscription. I have shopping cart setup to handle the sales. The cart writes everything to a database. The listener (customer) can purchase a single days "ticket" or the "season ticket" so that they can listen to EVERY game. The authentication will allow the listener in to the "listen" page (that has an embedded player) only if they've purchased the subscription. The cart doesn't have a "products" field so I can't check against the product ID to see if they have purchased the single day "ticket" or the "season" ticket. Here's where I need some help. I need to check the database (for a single day ticket) so that if the email_address field of the DB exists and the date_purchased field equals the current date, it will authenticate the user. If not, it ships them off to the shopping cart. ONE NOTE...THE DATE PURCHASED FIELD IN THE DB IS CURDATE + TIME (2007-06-06 23:45:15). I'd need to check against the date...not the time. Also, I need to check the DB (for a season ticket) so that if the email_address field of the DB exists and the order_total equals 75.00, it will authenticate the user. If not, it ships them off to the shopping cart. Can anyone point me in the right direction? Thanks. Brian Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.