Below is the script for i need to write to keep track of customers in my website. All i need is to fill out those values mid,cust_type,order_value etc from the database but i dont know how to? how can i combine php with javacript? any suggestions???

<script language="javascript">
<!--
/* Performance Tracking Data */
var mid = '';
var cust_type = '';
var order_value = '';
var order_id = '';
var units_ordered = '';
//-->
</script>


HELPPP!!!