-2

would this line of code redirect me to register.php on clicking the button if URL is correct?

<a href="/1/register/register.php"><input type="button" value="Join" id="join_button" ></a>
  • possible duplicate of [Button inside of anchor link works in Firefox but not in Internet Explorer?](http://stackoverflow.com/questions/802839/button-inside-of-anchor-link-works-in-firefox-but-not-in-internet-explorer) – Barmar Sep 22 '14 at 18:33

1 Answers1

0

No. Don't use input's inside anchors.

Try using this:

To redirect the user to a page, you can use JavaScript:

function doRedirect(url) {
  location.href = url;
  return true;
}
<input type="button" value="Go to other page" onclick="doRedirect('http://www.website.com')" />
Philip
  • 2,888
  • 2
  • 24
  • 36