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

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -