Jump to content

Search the Community

Showing results for tags 'maths'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 3 results

  1. <? //random numbers $arr = array(); while ( count($arr) < 6 ) { $x = mt_rand(1,24); if ( !in_array($x,$arr) ) { $arr[] = $x; asort($arr); } } foreach($arr as $x){ $numbers[]=$x." "; } for($i2=0;$i2<6;$i2++){ //start cycle if($i2=="0"){ $no01=$numbers[$i2]; } if($i2=="1"){ $no02=$numbers[$i2]; } if($i2=="2"){ $no03=$numbers[$i2]; } if($i2=="3"){ $no04=$numbers[$i2]; } if($i2=="4"){ $no05=$numbers[$i2]; } if($i2=="5"){ $no06=$numbers[$i2]; } //end cycle } //connect to database $sql91="SELECT * FROM l$table WHERE draw='$draw'"; $result91=mysql_query($sql91); while($rows91=mysql_fetch_array($result91)){ $user=$rows91['user']; $show1=$rows91['no01']; $show2=$rows91['no02']; $show3=$rows91['no03']; $show4=$rows91['no04']; $show5=$rows91['no05']; $show6=$rows91['no06']; //CHECK 01 if($rows91['no01']==$no01) { $MEMBER01=1; } elseif($rows91['no02']==$no01) { $MEMBER01=1; } elseif($rows91['no03']==$no01) { $MEMBER01=1; } elseif($rows91['no04']==$no01) { $MEMBER01=1; } elseif($rows91['no05']==$no01) { $MEMBER01=1; } elseif($rows91['no06']==$no01) { $MEMBER01=1; } else { $MEMBER01=0; } //CHECK 02 if($rows91['no01'] == $no02) { $MEMBER02=1; } elseif($rows91['no02'] == $no02) { $MEMBER02=1; } elseif($rows91['no03'] == $no02) { $MEMBER02=1; } elseif($rows91['no04'] == $no02) { $MEMBER02=1; } elseif($rows91['no05'] == $no02) { $MEMBER02=1; } elseif($rows91['no06'] == $no02) { $MEMBER02=1; } else { $MEMBER02=0; } //CHECK 03 if($rows91['no01'] == $no03) { $MEMBER03=1; } elseif($rows91['no02'] == $no03) { $MEMBER03=1; } elseif($rows91['no03'] == $no03) { $MEMBER03=1; } elseif($rows91['no04'] == $no03) { $MEMBER03=1; } elseif($rows91['no05'] == $no03) { $MEMBER03=1; } elseif($rows91['no06'] == $no03) { $MEMBER03=1; } else { $MEMBER03=0; } //CHECK 04 if($rows91['no01'] == $no04) { $MEMBER04=1; } elseif($rows91['no02'] == $no04) { $MEMBER04=1; } elseif($rows91['no03'] == $no04) { $MEMBER04=1; } elseif($rows91['no04'] == $no04) { $MEMBER04=1; } elseif($rows91['no05'] == $no04) { $MEMBER04=1; } elseif($rows91['no06'] == $no04) { $MEMBER04=1; } else{ $MEMBER04=0; } //CHECK 05 if ($rows91['no01'] == $no05) { $MEMBER05=1; } elseif($rows91['no02'] == $no05) { $MEMBER05=1; } elseif($rows91['no03'] == $no05) { $MEMBER05=1; } elseif($rows91['no04'] == $no05) { $MEMBER05=1; } elseif($rows91['no05'] == $no05) { $MEMBER05=1; } elseif($rows91['no06'] == $no06) { $MEMBER05=1; } else{ $MEMBER05=0; } //CHECK 06 if ($rows91['no01'] == $no06) { $MEMBER06=1; } elseif($rows91['no02'] == $no06) { $MEMBER06=1; } elseif($rows91['no03'] == $no06) { $MEMBER06=1; } elseif($rows91['no04'] == $no06) { $MEMBER06=1; } elseif($rows91['no05'] == $no06) { $MEMBER06=1; } elseif($rows91['no06'] == $no06) { $MEMBER06=1; } else{ $MEMBER06=0; } $TOTALMEMBER=$MEMBER01+$MEMBER02+$MEMBER03+$MEMBER04+$MEMBER05+$MEMBER06; ?> Basically what I am trying to do is check all 6 numbers that are randomly generated to the already stored user numbers in a mysql database. Its DRIVING me insane as I cannot work out why it wont work or the if statements wont equal each other. The database field is set to INT for the numbers. Cheers
  2. Dear PHPFREAKS I was hoping maybe i would be able to get some help here Im thinking on calculating fees and certain percentage of transaction ? Which would be the best way to do so ? so after each withdrawal upload sending funds there would be a specific charge applied plus a percentage ,so lets say i would be sending $20 and the recipient would only receive 17.50 Im using code igniter framework . Any help would be appreciated Thanks
  3. Hey guys, I'm trying to work out some logic for my hire system. I'm trying to work out how much to charge for an item. At the moment I'm taking the start date, the end date, and putting the range into an array. I'm then counting that array to find out the total amount of time that the hire lasts for. If a hire lasts for a day, then I charge a day rate. If the hire lasts more than 1.5 days, but less than 7, then a week price is charged. If a hire lasts 8 days, then I would charge a week rate, and a day rate. Anymore then It would become a second week. I don't really know where to start with this? I've never been good at maths Any help or tips would be lovely! Thanks!
×
×
  • 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.