i would suggest using a delimiter at the end of the line and then convert it into an array using explode(), here is what you could do.
//Make sure your text have (,) comma at the end of every line
$text = 'My Name,
My Full Name,
24';
//Convert it into an array
$text = explode(',', $text);
//fetch the value and assign it to variables then do an insert operation
//Use mysql_real_escape_string() to escape SQL injections.
$name = mysql_real_escape_string($text[0]);
$FullName = mysql_real_escape_string($text[1]);
$age = mysql_real_escape_string($text[2]);
and then you can create query like this.
$query = "INSERT INTO persons(name, fullName, age) values($name, $fullName, $age)";
$result = mysql_query($query);