How to WiFi Connect Arduino Yun to Apache webserver?

Same as Title.

How can i connect to an apache server with the YUN and send data to a php page via the onBoard WiFi?

This is the sketch on my Arduino YUN.

#include<Bridge.h>
#include<YunClient.h>
int watt = 0;
int readyLed = 13;
YunClient client;

void setup()
{
  
Bridge.begin();
digitalWrite(readyLed,HIGH); 


}
void loop()
{

      
  delay(3000);
  senddata();

}
void senddata()
{

watt = watt+1;      





client.connect("localhost:8888/MiaCartella/ProvaArduino/Sbam.php",80);
Serial.println();
Serial.println("Initiates connection");
Serial.println("Connecting");
delay(1000); //This one keeps it from hanging

if (client.connected()) {
Serial.println("Connected!");
client.print("GET http://localhost:8888/MiaCartella/ProvaArduino/Sbam.php?watt=");
client.print(watt);
client.println(" HTTP/1.1");
client.println("Host: localhost:8888");
client.println();
                            }
 
 else 
 {
 Serial.println("Connection failed");
 }
//}
  //stop client
  client.stop();
  while(client.connected() != 0) 
 {
   delay(5);
 }
}

This is my php page (Sbam.php) on Apache :

<html>



<?php
    
    $Host='localhost';
    $User='root';
    $Password='root';
    $Database='ProvaArduino';
    
    $Connessione=mysql_connect($Host , $User , $Password);
    if(!$Connessione){
        echo "Connessione fallita";
    }
    
    $DB=mysql_select_DB($Database);
    if(!$DB){
        echo "Impossibile trovare il DataBase";
    }

    
    $forbrukning = $_GET['watt'];
    
    echo $forbrukning;
    echo("Hello, World");
    
  
    
    ?>
</html>

In the php page i can’t see the data sent from the arduino.

Where did i fail?