Ethernet shield and MYSQL database

I can connect directly Ethernet shield and a MYSQl database without using GET or POST method with PHP?

If you are talking about connecting, you can connect to a server without sending anything.

If you are talking about posting data to the MySQL database, you will probably need to send a GET or POST request that contains the data you want to enter into the database.

There's a method or a library to send and give datas from database without using GET or POST?

Omnos: There's a method or a library to send and give datas from database without using GET or POST?

Yes. I use UDP in some cases, but that does not involve a true "connection".

Try to be more specific.

I’ve a page html into Arduino that writes the temperatures that it reads.
I want to send these values into database, but using get method the web page crash.

Omnos: I've a page html into Arduino that writes the temperatures that it reads. I want to send these values into database, but using get method the web page crash.

Then you need to fix the part of your GET request that crashes the server.

My code works fine. I posted a couple examples in the playground. http://playground.arduino.cc/Code/WebClient

This code is to get data but to send?

Omnos: This code is to get data but to send?

What does that mean? The link to the code I posted sends data to a LAMP server using both GET and POST methods.

I've done. The problem was the SD SPI thanks

I’ve another problem. Arduino don’t send datas.
what’s the problem? here the sketch:

#include <SPI.h>
#include <Ethernet.h>

byte mac[] = {  0x90, 0xA2, 0xDA, 0x0D, 0x4E, 0xD7 }; // MAC de la tarjeta ethernet shield
//byte ip[] = { 192,168,1,100 }; // Direccion ip local
byte server[] = { 192,168,0,5 }; // Direccion ip del servidor
//IPAddress server(192,168,0,4);
EthernetClient client;
float value;

// Definicion de pines

const int inPin = 0;  // sensor conectado a la entrada analoga 0

void setup()
{
  Serial.begin(9600);
  Ethernet.begin(mac); // inicializa ethernet shield
  delay(1000); // espera 1 segundo despues de inicializar
}

void loop()
{
  int value = analogRead(inPin);
  float celsius =  (value * 500L) /1024.0;     // 10 mV por grado celsius
  Serial.print(celsius); // Escribe en el puerto serial para monitorear
  Serial.print(" grados Celsius");

  Serial.println("Conectando..");

  if (client.connect(server,80)>0) {  // Se conecta al servidor
    client.print("GET tesina/temperature/Scrittura_temp.php/?valore='1'"); // Envia los datos utilizando GET
   // client.print(celsius);
    client.println(" HTTP/1.0");
    client.println("User-Agent: Arduino 1.0");
    client.println();
    Serial.println("Conexion exitosa");
  }
  else
  {
    Serial.println("Falla en la conexion");
  }
  if (client.connected()) {}
  else {
    Serial.println("Desconectado");
  }
  client.stop();
  client.flush();
  //delay(300000); // espera 5 minutos antes de volver a sensar la temperatura
}

here the php page:

<?php
             
                //controllo se sono presenti i parametri valore e localita
                if(isset($_GET['valore'])){
                    //Recupero il valore del parametro "valore"
                    $valore = $_GET['valore'];
 
                    //eseguo la connessione al database sul server locale
                    //inserendo nome utente e password
                    $connessione = mysql_connect('localhost', 'root', '');
 
                    //gestione degli errori
                    if (!$connessione) {die('Impossibile connettersi: ' . mysql_error());}
 
                    //seleziono il databse di nome arduino
                    mysql_select_db("cronologia",$connessione) or die( "Impossibile selezionare il database.");
 
                    //creo una stringa sql di inserimento con i valori
                    //recuperati dall'url
                    $query = "INSERT INTO temperature VALUES(NULL,$valore,NULL);";
 
                    //eseguo la query
                    $risultato = mysql_query( $query, $connessione );
 
                    //gestione degli errori
                    if(! $risultato ){die('Impossibile eseguire la query: ' . mysql_error());}
 
                    //chiudo la connessione al db
                    mysql_close($connessione);
                }
              
        ?>