Jump to content

WilmotS

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

WilmotS's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Oh i see, works fine now, thanks for your help.
  2. I have been looking for the problem and unable to find it. Hence the reason i have come to the forum. "giveto" is the name of the player they want to give the dice to. The code which i have showed you means if they send the dice to the name "none" then that code will be executed. Only if any name is typed into giveto such as Steven then it still does that code above. When that code should only be done if the giveto name is "none"
  3. I have been coding a new Dice Game for my website. Now on the owners control panel i have a function where they can send the dice. On that function i also want it to allow the owner to send the dice to "None" in which will drop the dice game. I have added that only everytime any name is put it into the giveto funtion the casino does as it has been set for when its sent to "none". Here is the code. ---------- if ($_POST['giveto']){ $giveto = $_POST['giveto']; $checkgiveto = mysql_query("SELECT username FROM users WHERE username='$giveto'"); $checkifexist = mysql_num_rows($checkgiveto); if($giveto = "none"){ mysql_query("UPDATE dice SET owner='None', maxbet='0', profit='0' WHERE country='$usercountry'"); echo "<font size=1 face=verdana color=white>This casino has been dropped!"; }else{ ---------- As you can see i have asked for that to happen when giveto is equal to "none". Only when anything is put there it still follows the code above and the casino drops. Anyone know what the problem is?
  4. I have created my lottery script. At the moment i simply have the time() function being used where the draw will happen. Im wondering if your able to get rid of that and just choose a particular time where i want the draw to happen. I want the draw to be done at 4pm everyday. (in GMT) Is this possible? and what would the right code be for it.
  5. Works great, thanks for your help.
  6. My code currently stands like this $ticketone = rand(1,25); $tickettwo = rand(1,25); $ticketthree = rand(1,25); $ticketfour = rand(1,25); function lotterytickets($ticketone,$tickettwo,$ticketthree,$ticketfour){ $array = array("$ticketone","$tickettwo","$ticketthree","$ticketfour"); sort($array,SORT_NUMERIC); $o = $array[0]; $t = $array[1]; $th = $array[2]; $f = $array[3]; $last = $o.$t.$th.$f; return $last; } mysql_query("INSERT INTO `lotto` (`id`,`username`,`one`,`two`,`three`,`four`) VALUES ('','$username','$o','$t','$th','$f')"); Only where it insters into Lotto the numbers are all shown as 0. Meaning something isnt functioning right. Wheres the problem?
  7. I have a lottery PHP script which i have been creating. The lottery contains four different numbers in which are four different fields in my database. On the random ticket buy the code for the four numbers are like this $ticketone = rand(1,25); $tickettwo = rand(1,25); $ticketthree = rand(1,25); $ticketfour = rand(1,25); I am wanting to do it so they can be put in order and then imported into my database in that right order. For example, If ticketone was 20, an tickettwo was 13, i would want it to be imported into the database so that ticketone would be 13. (being put into order) and ticket two would be 20 etc....
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.