I'm passing a string of parameter to my php code, but I don't know exactly what the parameters are. Let's say I pass in a string that contains
?&cName_1=fbe&cName_2=ege&cBirthday_1=r3rg&cBirthday_2=fev
I not only need to know what each parameter is but I also need the names and the birthdays to line up for my query.
I was trying the following code but that only works with one parameter at a time
$email = $_GET['email'];
foreach($_GET as $key => $value){
$query = "INSERT INTO directory(cName, cBirthday, username) VALUES('$value', '$pBirthday', '$email')";
$result = mysqli_query($con, $query);
}