How would I submit this data to my sqlite database based on user input?

Good day.

I am trying to produce a random name generator that will generate name,surname,age and dob.

How would I send the following result to a database a number of times based on user input?

<?php
echo randomName();

function randomName() {
    $firstname = array(
        'Johnathon',
        'Anthony',
        'Erasmo',
        'Raleigh',
        'Nancie',
        'Tama',
        'Camellia',
        'Augustine',
      
    );

    $lastname = array(
        'Mischke',
        'Serna',
        'Pingree',
        'Mcnaught',
        'Pepper',
        'Schildgen',
        'Mongold',
        'Wrona',
        'Geddes',
        'Lanz',
   
    );

    $name = $firstname[rand ( 0 , count($firstname) -1)];
    $name .= ' ';
    $name .= $lastname[rand ( 0 , count($lastname) -1)];

    return $name;
};

?>

With a simple FOR Loop using the users input as the count parameter for the loop.

Sponsor our Newsletter | Privacy Policy | Terms of Service