I'm trying to print one line of text in my database code and i want it to print under a button i have made in html.
<button id="gen" type="button">Generate tables by clicking here!</button>
<div id="response"></div>
$('#gen').click(function(){
$('#response').load('createtable.php');
});
And this code appears in createtable.php
echo "Tables were set up correctly.";
The problem is that nothing is showing up. If i change the line to
echo "<br>Tables were set up correctly.";
it will print everything after the <br> including the ";?> that closes the php code.
Anyone has any idea why?