HTML form buttons are not working

Hi,

I have a website developed with HTML and CSS.
This website has buttons for making selections and move from one page to the next one. All buttons’ code is like this:

            <form action="target_URL" method="post">
                <h2 class="h2button">
                    <input type="submit" value="Enter" class="lists_button">
                </h2>
            </form>

During the last few weeks, some persons have told me that nothing happens when they press the button, it is, the page stays where it is and does not go to the next one.

Any idea of what could be the problem here?

Thanks a lot!!!

That’s pretty odd code for something like this. Why not use links?

If you don’t want to use <a> then use <button> - you only need to use a form if there is at least one field other than the submit button.

Hi Ralph,

Could you please give me an example code of what you mean?

Thanks a lot!!

Hi felgall,

Could you please give me an example code of what you mean?

Thanks a lot!!

Perhaps clarify what you are trying to do. On my first reading, it sounded like you needed a standard menu.

Sure.

All I need to do is to have a button for going from one page to the next one, and be able to pass variables from one page to the next one using $_POST.

Thanks a lot!!

OK, sounds like a job for the backend (PHP and all that). What data are you passing from one page to the next?

In this specific page I am passing nothing. Here you can see page I mean:

http://www.libromania.cl/spanish/kent.shtml

In this case the button just go from this page to the next one. It works fine for me and many people, but for a few, when press the button, nothing happens.

It is like what is suggested here:
http://stackoverflow.com/questions/12377368/php-submit-button-not-working

Thanks a lot!!!

Either:

<a href="target_URL">Enter</a>

or

<a href="target_URL"><button>Enter</button></a>

would be a workable replacement for the original code posted.

Hi felgall,

I applied this suggestion, giving shape and colors with CSS.

Thanks a lot!