<button type="button" class="button" href="adminform.php">ADD ADMINISTRATOR</button> 

Recommended Answers

All 3 Replies

A button isn't a link, the href attribute has no effect. If you want to redirect to the admin page either style an <a> tag to look like a button or add an onclick event to the button so some javascript can process the redirect.

I try this:

<button type="button" class="button" href="adminform.php" onclick="administrators_form.php">ADD ADMINISTRATOR</button>

It does not show anything.

And it won't. onclick is used to specify which javascript function is called when an element is clicked.
You would need a matching javascript function to go with that on click:
function someFunction() {}
Given that you want to redirect you would then have the window.location.href command in there.

But, given that that is all it appears you want to do, use a <a href="administrators_form.php"> tag instead and style to look like a button.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.