Currently I have the following but it doesn't like me very much:
1. index.php:
<!DOCTYPE html>
<html>
<body>
<div id = "bookList">
<?php
include("list.php");
?>
</div>
</body>
</html>
2. list.php:
<?php
echo '<button id = "read">Read</button><br><br>';
echo
"<script type=\"text/javascript\">
$(\"#read\").click(function()
{
alert(\"<?php display(); ?>\");
});
</script>";
function display()
{
echo "hello";
}
?>
As is hopefully obvious from the code I posted above, I am attempting to create a button using php which when clicked on will in turn call a php function. I have not been successful as of yet. Any advice will be appreciated but I'd like my code to stay as close to what I currently have as possible.