Issue with enc28j60 eth -cant send GET request

Hello. I am working a simple project with arduino and an enc28j60 ethernet module. I want to send GET requests and catch them in localhost in a php script that i made , however i face a trouble.

Here is my arduino code that i use:

(enc pins: 10 = CS, 11 = SI, 12 = SO, 13 = SCK, 5V, Ground)

#include <UIPEthernet.h> // Used for Ethernet

// Arduino Uno
byte mac = { 0x54, 0x34, 0x41, 0x30, 0x30, 0x31 };
// For the rest we use DHCP (IP address and such)

EthernetClient client;
char server = “”; // IP Adres (or name) of server to dump data to
int interval = 5000; // Wait between dumps

void setup() {



void loop() {
// if you get a connection, report back via serial:
if (client.connect(server, 80)) {
Serial.println("-> Connected");
// Make a HTTP request:
client.print( “GET /index.php?”);
client.print( “2888806X” );
client.println( " HTTP/1.1");
client.print( " Host: " );
client.println( " Connection: close" );
else {
// you didn’t get a connection to the server:
Serial.println("–> connection failed/n");


and my basic php script:

<?php $link = mysqli_connect("localhost", "root", "", "variable"); if(mysqli_connect_error()){ die("database failed"); } if(isset($_GET['variable'])){ $query = "INSERT INTO variables (variable) VALUES ('". $_GET['variable'] ."') "; mysqli_query($link, $query); } ?>

I have tried many variations of the code and other examples but have found the solution yet. However if i put the url manually in browser from other device and check the database i can see the inserted data. Is there anyone who can help me?

Thank you.