Hi Guys

After 6 month of "information management" I had enough and am back to doing some development.

although, I seem to have hit the wall.
When I run a code below, the query for stored procedure returns the amount of results, when it actualy should return a new name for the image to be used further.

The Stored Procedure runs fine if called on MySQL Server


$House_ID='100';

//Check that there were no errors with any of the uploaded image
//Checks each image seperately
foreach ($_FILES["image"] ["error"] as $image => $error)
{
//If there are no errors
if ($error == UPLOAD_ERR_OK) {

//Read a name of the new image
$Old_Name=$_FILES['image']['name'][$image];
//Get an extension of the uploaded image
$Image_Extension=end(explode('.',$Old_Name));

//Call a stored procedure that inserts a new image data
//into the database
//The procedure returns an ID of the new image as text
$insert_image=mysqli_query(
$db_connect,
"CALL Insert_Image
('$Image_Extension',
$House_ID);");

$image_data=mysqli_fetch_array($insert_image);

//Set a new Image Name to a name returned by Stored Procedure
$Image_Name=$image_data[$New_Image];

mysqli_close($db_connect);
}

}