Save button will not work


#1

19 BUG


https://www.codecademy.com/courses/web-beginner-en-L83Do/0/3?curriculum_id=5124ef4c78d510dd89003eb8

The save button will not work. I've been having problems since this site has updated. Also the full screen preview does not work.

 <?php
      // Write your for loop below!
      for($i = 0; $i < 101; $i+10) {
          echo $i;}


#2

well, i think the problem is cause by a infinity loop, look at the code below:

$i = 10
echo $i + 10 // 20
echo $i // 10
$i = $i + 10
echo $i // 20

see your for loop:

$i+10

this will not update $i, it will just temporary add 10, as i just demonstrated with the code above.


#3

I have exactly the same problem, it's very frustrating. when i refresh the page the error message

"The program took too long to finish. Check your code for infinite loops and try again."

is shown before i even do anything. After closing the error message i've tried correcting, changing or even completely deleting the code and pressing save & submit code. The save & submit button the disappears and the page crashes. Forcing me to reload the page again and restart the whole process.

once the page is reloaded the code that's causing the problem reappears in the same place.

here's the code that it's stuck on.
for ($rrr=0; $rrr < 50; $rrr = $rrr++)

im stuck in a loop of trying to delete my loop. :weary:


#5

solved it myself.
used the full screen button to reset what the editor had saved.

process is like this.

reload page. -> close error message -> change/correct code
-> fullscreen (result should appear in fullscreen mode) -> back to
editor button -> save and submit button -> reload page again.

at this point the page should reload to show your amended code. you should then be able to save and submit successfully.

well i was able to anyway. im no pro but thats what worked for me.


#6

Found the answer in another post:

for($i = 10; $i <= 100; $i += 10) {
echo $i;}

This worked and was posted by "terasurfer007" Aug 2 in the "No way in 3. Writing Your First ‘For’ Loop" thread.

Thank you, I did not realize I needed I needed a +=.


#7