SOLVED – USER ERROR – helps if one declares a variable doesn’t it…
Help,
I have the following PHP Function code:
function new_respondent() {
global $link;
$proc = mysqli_prepare($link, "INSERT INTO trespondent_bps (code) VALUES (uuid());");
mysqli_stmt_execute($proc);
$respondent_id = mysqli_insert_id($link);
mysqli_stmt_fetch($proc);
mysqli_stmt_close($proc);
mysqli_clean_connection($link);
return($code);
}
For the life of me, it’s adding the UUID into the database no problems at all – but it’s not returning it so I can use it in the code – what am I missing/ doing wrong!!!
Thanks in advance,
Homer.
You return a variable
$codethat is undefined.