When the CEO becomes a developer IV
-
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 ?
-
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 ?
-
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 ?
i mean it! The glorious "How-Not-To Programming", or "The 99 Don'ts of Web Development"
-
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 ?
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...
-
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 ?
-
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 ?
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.