Do you actually get any of the two echo messages in your script?
Also you could change this line
$result = mysql_query($SQL);
$result = mysql_query($SQL) or die ('error ' . mysql_error() . ' in query ' . $SQL);
That will show you any errors in the execution of your query.
And if no errors show up, and still nothing is inserted, try echoing $SQL anyway to see if it is what you expect it to be.