I am writing an intranet customer manager (so will not be accessible at all from the internet, and runs locally only). I am using Uploadify http://www.uploadify.com/documentation/ , a Jquery script to add files to each of the customers records (its being used in a shop, so the shop keeper can add photos / measurement info for the customers carpets).
I am using the following settings in the head of my index.php to call the jquery uploader. What I cant work out is how to add a dynamic upload folder to it ?. What it needs to do is be :
'folder' : './customer-files/<?php $_GET['cfid'] ?>',
Is it even possible to mix jquery and php like this ?, what its supposed to do is replace the cfid stored in GET with the actual id number of the customer, for example ./customer-files/22
<script type="text/javascript" src="./uploadify/swfobject.js"></script>
<script type="text/javascript" src="./uploadify/jquery.uploadify.v2.1.4.min.js"> </script>
<script type="text/javascript">
// <![CDATA[
$(document).ready(function() {
$('#customeraddnewfile').uploadify({
'uploader' : './uploadify/uploadify.swf',
'script' : './uploadify/uploadify.php',
'cancelImg' : './uploadify/cancel.png',
'folder' : './customer-files',
'auto' : true
});
});
// ]]>
</script>