I'm putting data from a mysql db and place it within a hidden input field. From there I want to store the value of the input field as a javascript variable so that I may run an equation on it.
The following is an example the code:
<input type="text" name="hiddenValue" value="<?php include('select.php'); ?>">
var inputValue = $("#hiddenValue").val();
var startValue = ((inputValue - totalCost) / totalCost ) * 100;