My biggest issue with your code is mysql please please please look into mysqli or PDO
ok so your code
bad code below -> you don't need to declare the database in the query
$sql = "INSERT INTO [B]'test1'.[/B]'contacts' ('FirstName', 'LastName', 'Email', 'Mobile', 'Message')
VALUES ('$FirstName', '$LastName', '$Email', '$Mobile', '$Message');";
good code. notice also i have used ticks and not single quotes ' . singles quotes should only be used in the VALUES
[code]
$sql = "INSERT INTO
contacts(
FirstName,
LastName,
Email,
Mobile,
Message`)
VALUES ('$FirstName', '$LastName', '$Email', '$Mobile', '$Message');";
[/code]
hopefully this will get you started towards fixing your code.