$username in INSERT has no value!
I have added some more [man]mysql_error/man
You can try and see what error messages will come now
You should NOT insert 'id' of a new row. This is done automatically.
<?php
$con = mysql_connect("MySQL Host", "username", "pass");
if(!$con) exit('Could not connect: ' . mysql_error());
$db_selected = mysql_select_db("DB Name",$con);
if(!$db_selected) exit('DB could not select. '.mysql_error());
$sql = "SELECT * FROM pokemon";
$row = mysql_query($sql,$con);
if (!$row) echo 'Error: '.mysql_error();
$num = mysql_num_rows($row);
if($num == "0"){
$res = mysql_query("INSERT INTO pokemon
(name, owner, slot, attack1, attack2, attack3, attack4, hp, max_hp, speed, defense, attack, spattack, spdefense, level, promo)
VALUES ('Darkrai', '$username', '1', 'Shadow Punch', 'Nightmare', 'Shadow Ball', 'Sleep Powder', '40', '20000', '50', '70', '50', '80', '70',
'10', 'Yes' ) ");
if (!$res) echo 'Error: '.mysql_error();
else echo 'Yes, INSERT';
//echo "<input type=\"submit\" value=\"Obtain!\" name=\"Darkrai\" onclick=post()";
}else{
echo "Already Obtained";
}
?>
<input type="submit" value="Obtain!" name="Darkrai" onclick=post()>