Webserver issue - help please!- happy holidays!

Hey all,

im working on a project, i have culled it down to just the webserver code (see attached) what i want to do is have a ahref link activate pin 43 and make it high. The issue is i cannot work out why it wont work, i have a basic security log in setup which i think is making it more complicated, hence why im now putting it out to you all. If you could have a look at the code and let me know your oppions i would apprecitate it so much!! you will have made my holidays!.

Any thoughts are welcome,

Thanks again all cant wait to hear your thoughts!.

kind regards

ethernet_only_code.ino (4.68 KB)

post your code directly in the forum, it’s small enough as members can’t read it easily from a mobile
please take the time to format it correctly (ctrl-T in the IDE will help) and use code tags

what do you expect from

  int (43, OUTPUT);

why do you have two open curly braces { at the start of your function

void SendOKpage(EthernetClient &client)
{ {

what’s with all the white lines and blocks

  {



    client.println(F("<h1>Nominal Number Read Out</h1>"));

  }

hard to read but I think your code does not have matching {}, so won’t even compile…

for example, where is the closing } for

void SendAuthentificationpage(EthernetClient &client)
{

But you might be missing a block when you do if (strstr(linebuf, "Authorization: Basic") > 0 && strstr(linebuf, "YWRtaW4=") > 0)(also don’t compare the result of strstr with a > 0, that will throw a warning, just test against NULL ( != NULL)

==> advice: it seems you have been randomly adding curly braces here and there… they have a reason to exist… learn about when you need them and clean up your code, ensure you have blocks where needed.

To put your code in a code box, use the </> icon in the far left of the post tool bar and paste your code between the two bracket sets that appear.

To go back and put your code in a code box, in the bottom right of your post, select “more” and click modify. When the modify post opens, high light your code and click the </> in the far left of the post tool bar. This will put you code in code brackets. Then save the changes.