Adding a Lotto to my website

Results 1 to 2 of 2

Thread: Adding a Lotto to my website

  1. #1
    Join Date
    Dec 1969

    Default Adding a Lotto to my website

    I have been thinking about adding a daily lottery to my website, where people choose 3 out of 10 numbers and at midnight the server determines if they got the right combination and pays their account whatever the winnings are. That said, if anyone knows how to make the server go through a list of the days entries and automatically send out the emails saying "You won" or "you lost" I would appreciate the input. Perhaps you can recommend an article on the 4guysfromrolla website.<BR><BR>Thanks in advance.<BR><BR>Edward Stoever<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Adding a Lotto to my website

    First, get the entries into a database table (lets call it entries) with: e-mail, num1, num2 and num3 as the fields. Simply have the server determine the 3 winning numbers (put them in variables win1, win2 and win3), then perform the following SQL statement on the table:<BR><BR>SQL = "SELECT email FROM entries WHERE num1 = " & win1 & " num2 = " & win2 & " num3 = " & win3<BR><BR>Then, loop through the recordset and send an "you win" e-mail to each winner (if you don&#039t know how to send e-mails, run a search on 4guys). Then, do another SQL statement, the same thing only getting all the ones that did not win ( ".. WHERE NOT num1 = " & win1 & " NOT num2 = " & win2 ..)<BR>and send a "you lose" e-mail to each

Posting Permissions

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