MyBB Community Forums

Full Version: I like talking in fake PHP.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
if ($_GET["action"] == "alot"){
$sql = "SELECT * FROM `diseases` WHERE `type` = 'std' LIMIT 0,100";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
die('Error Code 3: Condom Not Found')
}
}
<span style="display: none;">this is how much action you get</span>
You have horrible white spacing habits.
echo "It makes things easier to read.";
On the contrary.

if ($_GET["action"] == "alot")
{
    $sql = "SELECT * FROM `diseases` WHERE `type` = 'std' LIMIT 0,100";
    $result = mysql_query($sql);
    while($row = mysql_fetch_array($result, MYSQL_ASSOC))
    {
        die('Error Code 3: Condom Not Found');
    }
} 

Also note you forgot a semi colon after the die() statement.

With a bit of optimization...

if ($_GET['action'] == 'alot')
{
    while($row = mysql_fetch_array(mysql_query("SELECT * FROM `diseases` WHERE `type` = 'std' LIMIT 0,100"), MYSQL_ASSOC))
    {
        die('Error Code 3: Condom Not Found');
    }
}

But the code still doesn't make sense, sense you would be repeatadly executing die(), but because of the nature of die() it doesn't work that way and the code does nothing but echo "Error Code 3: Condom Not Found" if $_GET["action"] is equal to "alot".
It was a joke... lol. Because you die from the STDs, get it?

Blush
Only if you don't treat them Toungue
(2010-07-07, 03:38 PM)Anman Wrote: [ -> ]Only if you don't treat them Toungue

[Image: facepalm.jpg]

You can't treat STD's N00b only STI's.

I think
You can treat a few of them.
The terms are used interchangeably.
http://en.wikipedia.org/wiki/Sexually_tr...ed_disease
Pages: 1 2 3 4