I have a a page of some HTML with a div, when a button is clicked, PHP echos some HTML text. I would like to be place this echoed text inside of the div but am not sure how to do this.
Code for the php:
if ($result != False)
{
echo '<div id="addBus"><h1>The bus exists!</h1></a></div>';
} else {
echo '<div class="error"><h1>Error! Please try again or contact administrator.</h1></a></div>';
}
HTML code:
<div class="settingCont">
<form class="Usertable" method="POST">
<input class="routeSettings" id="routeName" type="text" name="routeName" class="validate" placeholder="Enter a bus route">
<button class="btn waves-effect waves-light routeSettings" type="submit" name="action">Enter</button>
</form>
</div>
And below is a photo of what the code is currently doing: