Skip to content
Advertisement

Using isset() inside a foreach doesn’t work?

Basically, I have an indefinite number of buttons that I want to generate from variables held in the mysql database.

JavaScript

Now when I try to press the buttons nothing happens. This is the code I thought might work for that:

JavaScript

There are no errors. I think it’s because I can’t use isset inside a foreach this way. Is there some other efficient way of doing what I am trying to do here?

Advertisement

Answer

The reason I was getting this error was because I forgot to use <form> tags in the html file.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement