Controlling 2 leds

Hello guys I have a problem with this code,I need help,this code is specified for controlling one led through web server,but i want to control two led,I tried and tried but i failed.If any one can help me to add the code for another led but not to change the code just to add. I will be thankful,and please he/she can send the modified code through this email

michaelmuxh69@gmail.com

The code is in the attachment.

Good.ino (3.52 KB)

Learn how to show your code using code tags.

.

Your code is not opening for me.Add code using Code tags

If any one can help me to add the code for another led but not to change the code just to add. I will be thankful

You have code today:

 /* Dynamically generate the LED toggle link, based on its current state (on or off)*/
  char ledText[80];
  
  if (ledState) {
    strcpy(ledText, "LED is on. <a href=\"/?led=0\">Turn it OFF!</a>");
  }

  else {
    strcpy(ledText, "LED is OFF. <a href=\"/?led=1\">Turn it ON!</a>");
  }
 
  ledState = digitalRead(ledPin);

It seems pretty obvious that, to control two LEDs, you need two hyperlinks, two states, and two pins.

And, of course, you need different values in the led= lines, to distinguish which LED to control.

Why you are reading the state again after formatting the hyperlinks is a bit of a mystery.

So how do i add those hyperlinks,states and pins am new in programming can you help me to add(I mean rewriting the code) and send it to me please! am so in need of it :wink:

And how do I use code tags? please I need your help guys.