• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Server.on with nested if statements???

Q&A Forum › Category: ESP32 › Server.on with nested if statements???
0 Vote Up Vote Down
Barry asked 3 years ago

I have taken several Server.On  and am trying to consolidate them for improved visibility. (See code below the line).  There are several cases of params==1, a case of params=3.
In the params==1 case, the ERASE function works fine. but other functions under the USER CONFIG section do not. It appears as though the enter Server.On is not being called as the first Serial.print statements at the top do no execute.
Possibly this is a pointer problem after the POST is retrieved?
Another possibility is that once the test for ERASE fails, the Server.On terminates??????
This all worked before I started my consolidation, so this is a self inflicted injury!
I realize this is an odd case.
https://pastebin.com/SaVLjzTC            <– never tried this before. hope it works
Thanks for any assistance.
 

Question Tags: Server.on
2 Answers
0 Vote Up Vote Down
Barry answered 3 years ago

Solved
Found the issue. Needed the URL of the page:    server.on(“/userconfig”
rather than just server.on(“/”
The nesting works fine now!

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Hi.
Great! ‘m glad you found the issue.
I’ll mark this issue as resolved.
If you need further help, you just need to open a new question in our forum.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.