This is the code:
$sql = "SELECT * FROM blad1 order by RAND() LIMIT 6";
$result = mysql_query($sql) ;
$row = mysql_fetch_array($result);
$Vnaam = $row["Voornamen"];
$sql1 = "SELECT * FROM blad1 order by RAND() LIMIT 6";
$result = mysql_query($sql) ;
$row = mysql_fetch_array($result);
$Anaam = $row["Achternamen"];
$sql2 = "INSERT INTO duivengebruiker (Duif1) VALUES ('$Vnaam $Anaam')";
mysql_query($sql2);
$sql = "SELECT * FROM blad1 order by RAND() LIMIT 6";
$result=mysql_query($sql) ;
$row=mysql_fetch_array($result);
$Vnaam = $row["Voornamen"];
$sql1 = "SELECT * FROM blad1 order by RAND() LIMIT 6";
$result = mysql_query($sql) ;
$row = mysql_fetch_array($result);
$Anaam = $row["Achternamen"];
$sql2 = "INSERT INTO duivengebruiker (Duif2) VALUES ('$Vnaam $Anaam')";
mysql_query($sql2);
This creates 2 rows and places the 1st result in the 1st column of the 1st row and places the 2nd result in the 2nd column of the 2nd row. I only want 1 row with both the columns filled in. How do I do this? Probably something easy.
If I understand you correctly what you want to do is select both random names before executing your insert. That way you can include them both in one query. For example, you could try something like this: