en der kan sige hvorfor denne kode ikke går ind i databasen?
den kan forbinde til databasen, men den vil ikke ligge det ind.
<?php
mysql_connect("localhost","root","MYPASSWORD") or die(mysql_error());
mysql_select_db("accounts") or die(mysql_error());
$select = $_POST['reward'];
$character = $_POST['name'];
//Remove bullshit characters from user entered data
$character = mysql_real_escape_string(htmlentities($character));
$query = "SELECT guid FROM characters WHERE name = '".$character."'";
$result = mysql_query($query) or die(mysql_error());
$numrows = mysql_num_rows($result);
echo "<tr><td align=center>";
//if no rows exist, the character does not exist
if($numrows == 0)
{
die('No character');
}
$row = mysql_fetch_array($result);
$acct = $row[0];
$query = "insert into mailbox (message_type, player_guid, sender_guid, subject, body, money, attached_item_guids, cod, stationary, expiry_time, delivery_time, copy_made, read_flag, deleted_flag) values (0, ".$acct.", 0, Thank you for voting, Thank you for voting, 0, 34440, 0, 61, 0, 0, 0, 0, 0) or die(mysql_error())";
echo "muh";
echo "$row[0]";
?>