I already looked over almost everything online to find something that answers my question but couldn't find a solution.
So Basically what I'm trying to do is to create a website that runs python codes on button click and return the result.
I've created a very simple and basic php page test.php
<html>
<head>
<title> test </title>
</head>
<body>
<input type="button" name="runscript" value=" Run Python code " onClick="<?
php exec('python myscript.py'); ?>">
</body>
</html>
and this is my python code myscript.py:
print("Hello, world!")
what I want is to take back the result of the code and put it back in the website.
But I have no idea how to deal with it or how to do it.
And on the actual website that I will be building, will have to bring back graphs and plots from the python codes and I don't know either how to do it.