This is
terribly dangerous to use on a server. Aside from the fact you aren't checking GM accounts, SQL injection would be easy as well. For example, if I enter the following in the item ID field your mail table would be dropped from the database.
Code:
0');DROP TABLE mailbox_insert_queue; --
Why does this work? Lets look at your query.
Code:
("INSERT INTO" .$mailbox_queue. " VALUES ('$charID', '$charID', '$subject', '$text', '62', '0', '$itemid', '0')
What would it look like if I entered the above?
Code:
("INSERT INTO" .$mailbox_queue. " VALUES ('$charID', '$charID', '$subject', '$text', '62', '0', '0');DROP TABLE mailbox_insert_queue; --', '0')
At least use
PHP: mysql_real_escape_string - Manual if you're going to be inserting things into the database. This isn't entirely secure, but it's certainly more than you have here. I'd also recommend reading the following.
http://dev.mysql.com/tech-resources/...curity-ch3.pdf