I have a php file in which a GET a variable from another PHP file.Now I want to pass this variable to another PHP file which is given inside Javascript. How can I do that? Here is the code from Uploadify
<head>
<script type="text/javascript" src="uploadifyit/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="uploadifyit/swfobject.js"></script>
<script type="text/javascript" src="uploadifyit/jquery.uploadify.v2.1.4.min.js">
<script type="text/javascript">
$(document).ready(function() {
//alert('I am ready to use uploadify!');
$("#file_upload").uploadify({
'uploader': 'uploadifyit/uploadify.swf',
'script': 'uploadifyit/uploadify.php',
'cancelImg': 'uploadifyit/cancel.png',
'folder': 'uploads',
'auto': false, // use for auto upload
'multi': true,
'queueSizeLimit': 200,
'onQueueFull': function(event, queueSizeLimit) {
alert(" You can upload " + queueSizeLimit + " files at once");
return false;
},
'onComplete': function(event, ID, fileObj, response, data) {
// you can use here jQuery AJAX method to send info at server-side.
$.post("insert.php", { name: fileObj.name}, function(info) {
alert(info); // alert UPLOADED FILE NAME
});
}
});
});
</script>
</head>
<body>
<?php
$tabname=$_GET['tabname'];
?>
<form id="form1" name="form1" action="">
<input type="file" id="file_upload" name="file_upload" /><br />
<a href="javascript:$('#file_upload').uploadifyUpload();">Upload File</a>
</form>
</body>
</html>
See the section, $tabname is the variable I want to use in insert.php. I need to pass this $tabname to insert.php and use it within that..Thanks in advance