If you're using one PHP call to get data from or send data to the database, it won't work. The MySQL PHP drivers support execution of a query string, not a script. If you want to execute multiple commands with one call, check out stored procedures.
http://dev.mysql.com/doc/refman/5.0/en/stored-routines.html
I think you're trying to do this?
<?php
$query = "SELECT name, subject, message FROM contact;select name from contact;";
$result = mysql_query($query);
?>
It won't work because PHP doesn't know what query you are looking to execute. You can do the following though, but most likely you knew that:
<?php
$query = "SELECT name, subject, message FROM contact";
$query2 = "SELECT name, message FROM contact;select name from contact;";
$result = mysql_query($query);
$result2 = mysql_query($query2);
?>
Hope this helps,
Jeffrey Kevin Pry