It's just simple text formatting ... I assume from the $POST array?
$ten_digit_number=$_POST['field1']."-".$_POST['field2']."-".$_POST['field3'];
Now, use $ten_digit_number in your SQL queries:
$query="insert into mytable values($ten_digit_number)";
$result=mysql_query($query);
if (!$result) {
die("Database write failed!");
} else {
echo "Number was added to database.";
}
Keep in mind this is slightly simplified, and not tested yet, but this is the basic idea.
Perhaps you need a good textbook? http://www.amazon.com/Beginning-Apache-MySQL-Development-Programmer/dp/0764579665