I want to write a function that contains two more functions for example:
function connexion_stmt_bind_exe(&$stmt, $types, $var, $url){
mysqli_stmt_bind_param($stmt, $types, $var);
if(!mysqli_stmt_execute($stmt)){
header($url);
exit();
}
}
but I have a problem when I want to insert more than one variable in $var.
I use the mysqli_stmt_bind_param function a lot and I want to write one function that contains these two functions but the mysqli_stmt_bind_param function can have more than one $var, each case on its own. In some cases the function look like:
mysqli_stmt_bind_param($stmt, $types, $var, $var2, $var3);
And in other cases there is even more "$var"
I can not use the connexion_stmt_bind_exe function because the amount of variables varies from one code to another. thanks, I would be happy for help in this matter