Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. When the CEO becomes a developer IV

When the CEO becomes a developer IV

Scheduled Pinned Locked Moved The Weird and The Wonderful
phpdatabasemysqlquestionannouncement
6 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    imagiro
    wrote on last edited by
    #1

    In this software users have virtual money (so called 'coins'). You donate (real money) to get coins or you are very active on the platform, and for these coins you can buy extra features. Recently the CEO asked me, why some users have millons of 'coins' on there account. So I looked at the code and I found this:

    <p>This will cost you 9.99 of your coins.
    Please acknowledge the transaction by clicking
    on "Pay"</p>
    <form method="post" action="">
    (more stuff)
    <input type="hidden" name="amount" value="9.99">
    <input type="button" value="Pay">
    </form>

    And the PHP looked like this:

    $query = "SELECT * FROM user WHERE id = $id";
    $res = mysql_query($query);
    while($row = mysql_fetch_array($res))
    {
    $amount = $row["amount"];
    }
    $amount = $amount - $_POST[amount];
    $query = "UPDATE user SET amount = $amount WHERE id = $id";

    I will not talk about all the other errors and flaws here, I'm just asking you: How is the math for: 4.55 - -1,000,000 ?

    J K B _ OriginalGriffO 5 Replies Last reply
    0
    • I imagiro

      In this software users have virtual money (so called 'coins'). You donate (real money) to get coins or you are very active on the platform, and for these coins you can buy extra features. Recently the CEO asked me, why some users have millons of 'coins' on there account. So I looked at the code and I found this:

      <p>This will cost you 9.99 of your coins.
      Please acknowledge the transaction by clicking
      on "Pay"</p>
      <form method="post" action="">
      (more stuff)
      <input type="hidden" name="amount" value="9.99">
      <input type="button" value="Pay">
      </form>

      And the PHP looked like this:

      $query = "SELECT * FROM user WHERE id = $id";
      $res = mysql_query($query);
      while($row = mysql_fetch_array($res))
      {
      $amount = $row["amount"];
      }
      $amount = $amount - $_POST[amount];
      $query = "UPDATE user SET amount = $amount WHERE id = $id";

      I will not talk about all the other errors and flaws here, I'm just asking you: How is the math for: 4.55 - -1,000,000 ?

      J Offline
      J Offline
      Jeroen De Dauw
      wrote on last edited by
      #2

      I almost feel like asking where the web app is to mess around with it myself :D

      Jeroen De Dauw
      Blog ; Wiki

      1 Reply Last reply
      0
      • I imagiro

        In this software users have virtual money (so called 'coins'). You donate (real money) to get coins or you are very active on the platform, and for these coins you can buy extra features. Recently the CEO asked me, why some users have millons of 'coins' on there account. So I looked at the code and I found this:

        <p>This will cost you 9.99 of your coins.
        Please acknowledge the transaction by clicking
        on "Pay"</p>
        <form method="post" action="">
        (more stuff)
        <input type="hidden" name="amount" value="9.99">
        <input type="button" value="Pay">
        </form>

        And the PHP looked like this:

        $query = "SELECT * FROM user WHERE id = $id";
        $res = mysql_query($query);
        while($row = mysql_fetch_array($res))
        {
        $amount = $row["amount"];
        }
        $amount = $amount - $_POST[amount];
        $query = "UPDATE user SET amount = $amount WHERE id = $id";

        I will not talk about all the other errors and flaws here, I'm just asking you: How is the math for: 4.55 - -1,000,000 ?

        K Offline
        K Offline
        Kevin Drzycimski
        wrote on last edited by
        #3

        i mean it! The glorious "How-Not-To Programming", or "The 99 Don'ts of Web Development"

        1 Reply Last reply
        0
        • I imagiro

          In this software users have virtual money (so called 'coins'). You donate (real money) to get coins or you are very active on the platform, and for these coins you can buy extra features. Recently the CEO asked me, why some users have millons of 'coins' on there account. So I looked at the code and I found this:

          <p>This will cost you 9.99 of your coins.
          Please acknowledge the transaction by clicking
          on "Pay"</p>
          <form method="post" action="">
          (more stuff)
          <input type="hidden" name="amount" value="9.99">
          <input type="button" value="Pay">
          </form>

          And the PHP looked like this:

          $query = "SELECT * FROM user WHERE id = $id";
          $res = mysql_query($query);
          while($row = mysql_fetch_array($res))
          {
          $amount = $row["amount"];
          }
          $amount = $amount - $_POST[amount];
          $query = "UPDATE user SET amount = $amount WHERE id = $id";

          I will not talk about all the other errors and flaws here, I'm just asking you: How is the math for: 4.55 - -1,000,000 ?

          B Offline
          B Offline
          Billy T
          wrote on last edited by
          #4

          ok, so looks like you've got a job then - better get onto it and rewrite the app. If the CEO has written it without any programming skills, and he's attracted a bunch of keen users, and he's already got funding to employ you, then I'd say he's not doing too bad...

          1 Reply Last reply
          0
          • I imagiro

            In this software users have virtual money (so called 'coins'). You donate (real money) to get coins or you are very active on the platform, and for these coins you can buy extra features. Recently the CEO asked me, why some users have millons of 'coins' on there account. So I looked at the code and I found this:

            <p>This will cost you 9.99 of your coins.
            Please acknowledge the transaction by clicking
            on "Pay"</p>
            <form method="post" action="">
            (more stuff)
            <input type="hidden" name="amount" value="9.99">
            <input type="button" value="Pay">
            </form>

            And the PHP looked like this:

            $query = "SELECT * FROM user WHERE id = $id";
            $res = mysql_query($query);
            while($row = mysql_fetch_array($res))
            {
            $amount = $row["amount"];
            }
            $amount = $amount - $_POST[amount];
            $query = "UPDATE user SET amount = $amount WHERE id = $id";

            I will not talk about all the other errors and flaws here, I'm just asking you: How is the math for: 4.55 - -1,000,000 ?

            _ Offline
            _ Offline
            _fboy_
            wrote on last edited by
            #5

            upon seeing all these code, I just want to poke my eyes out.

            1 Reply Last reply
            0
            • I imagiro

              In this software users have virtual money (so called 'coins'). You donate (real money) to get coins or you are very active on the platform, and for these coins you can buy extra features. Recently the CEO asked me, why some users have millons of 'coins' on there account. So I looked at the code and I found this:

              <p>This will cost you 9.99 of your coins.
              Please acknowledge the transaction by clicking
              on "Pay"</p>
              <form method="post" action="">
              (more stuff)
              <input type="hidden" name="amount" value="9.99">
              <input type="button" value="Pay">
              </form>

              And the PHP looked like this:

              $query = "SELECT * FROM user WHERE id = $id";
              $res = mysql_query($query);
              while($row = mysql_fetch_array($res))
              {
              $amount = $row["amount"];
              }
              $amount = $amount - $_POST[amount];
              $query = "UPDATE user SET amount = $amount WHERE id = $id";

              I will not talk about all the other errors and flaws here, I'm just asking you: How is the math for: 4.55 - -1,000,000 ?

              OriginalGriffO Offline
              OriginalGriffO Offline
              OriginalGriff
              wrote on last edited by
              #6

              Is there any chance you could get him a job with Paypal? Please?

              Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.

              "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
              "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups