I have a ticker, that has two buttons that raise and lower the value by one each time the corresponding button is clicked. I would also like this to be equal with the value of a number located in a text file. For example, the value of both the counter and the file are zero. I press the "+1" button, now both the counter and the number in the file are equal to 1. How might i do this? So far this is all i have been able to do because php is all executed at once.
<!DOCTYPE html>
<html>
<head>
<title>Ticker</title>
<link rel="stylesheet" type="text/css" href="../resources/css/ticker.css" />
<script src="../resources/js/ticker.js"></script>
</head>
<body>
<div class="box">
<label for="qty"><abbr title="Quantity">Qty</abbr></label>
<input id="qty" value="<?php echo file_get_contents('Data.txt'); ?>" />
<button id="down" onclick="modify_qty(-1)">-1</button>
<button id="up" onclick="modify_qty(1)">+1</button>
</div>
</body>
</html>