I was following an tutorial, and i finish with this code:
<script type="text/javascript" src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
<script type="text/javascript">
$(function($){
$("#compila").click(function(){
var code = $(#codigo).html();
$.post("myajax.php",{code:code},function(return){
$(#result).html("<b>print </b>"+return);
});
});
});
</script>
<?php
$code = $_POST["code"];
echo $code;
?>
but this code doesn't work. I was using a text area, and i'm trying to send a string of the text area to a
tag, and print with echo of the php. How i can fix this code?