php - GET variable passed with jquery -
this jquery function
start: function() { var text; if(($('#choose2').css('display')!='none')){ text=$( "#select option:selected" ).text(); $('#1').load(this.path+'\compile.php?file=' +text).show(); }else if(($('#choose3').css('display')!='none')){ text=$( "#select option:selected" ).text(); $('#1').load(this.path+'\execute.php?file=' +text).show(); } }
this problem: compile.php
works fine , results show in div id=1
, execute.php
page works same var passed before compile.php
(also if select other file select box). if don't use compile.php
before, execute.php
doesn't work. testing used in compile.php
:
echo 'this file compile '.$_get['file'];
and in execute.php
:
echo 'this file execute '.$_get['file'];
but wrote, file remains same. suggestion?
you should add client side or server side check make sure compile.php has been invoked before execute.php file
you can store in session or cookie or client side can keep track of it.
Comments
Post a Comment