With a POST request, I get the name of someone that I want to link with its id the mySQL database. For that, I create a query as you can see below and I need to put the result (a simple number) into a variable to use it for other queries.
I know that I could make joints with SQL but I'm trying to do it this way.
$owner = $_POST['owner'];
$queryUser = "SELECT id FROM collections WHERE name = '$owner'";
$idUser = $mysqli->query($queryUser) or die($mysqli->error.__LINE__);
With this code, I can't use $idUserbecause it appears as an 0, a 1 (recogniezd as an array?) or nothing when I try to write it somewhere in my database. I tried to use the intval() function with no results...
Any help?