Arduino UNO problem GET to php

Hi Everybody,

I have some trouble GET my serial data to a php page. I use a Arduino uno with a enc28j60.
every time i write something in the serial monitor i receive a email (send by the php) but without the serial data sting.
if i use ether.browseUrl(PSTR ("/mail.php?data=test"), , website, NULL) i receive test as message in the email.

anybody have a suggestion?

This is the code i use

#include <EtherCard.h>

// ethernet interface mac address, must be unique on the LAN
static byte mymac[] = { 0x74, 0x69, 0x69, 0x2D, 0x30, 0x31 };

byte Ethernet::buffer[700];
unsigned long timer;

const char website[] PROGMEM = "[u]I have my domain name here[/u]";

const byte sizeMax = 50;
char messageBuffer[sizeMax + 1];
byte index=0;

boolean waitForMessage(const char endChar)
{
  boolean fullMessage = false;

  if (Serial.available()) { // if there is at least one char waiting
    int rec = Serial.read(); // -1 if error, otherwise our char
    if (rec != -1) {
      if (rec == endChar) fullMessage = true; // end of message
      else {
        if (rec != '\r') { // ignore CR
          messageBuffer[index++] = (char) rec;
          messageBuffer[index] = '\0'; // mark end of string
          if (index >= sizeMax) index = sizeMax - 1; // do not overflow
        }
      }
    }
  }
  return fullMessage;
}


void setup ()
{
  Serial.begin(9600);

  if (ether.begin(sizeof Ethernet::buffer, mymac) == 0)
    Serial.println( "Failed to access Ethernet controller");

  // DHCP Setup
  if (!ether.dhcpSetup())
    Serial.println("DHCP failed");

  ether.printIp("IP:  ", ether.myip);
  ether.printIp("GW:  ", ether.gwip);
  ether.printIp("DNS: ", ether.dnsip);

  // DNS Setup
  if (!ether.dnsLookup(website))
    Serial.println("DNS failed");

  ether.printIp("SRV: ", ether.hisip);
}

void loop () {
  ether.packetLoop(ether.packetReceive());

  if (waitForMessage('\n')) {
    ether.browseUrl(PSTR ("/mail.php?data="),messageBuffer ,   website,  NULL);
    // clean up the buffer for next time
    index = 0;
    messageBuffer[0] = '\0';
    Serial.println("Request sent");
  }
}

why the *$#&! are you creating a new topic on this.

why don’t you continue in the other thread

Locked