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;
};
?>