I have my Javascript inside echo, but i want it to have a php also inside. I dont know if it is possible, just want to know the right way. cheers.
<?php
if($_GET["main"]=="add-doc"){
echo "<script>
var r=confirm(\"Press a button\");
if (r==true)
{
<? require_once(\"doc_add.php\"); ?> <--- PHP here
}
else
{
x=\"You pressed Cancel!\";
}
</script>";
}
?>