Click here to Skip to main content
15,886,639 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
XML
<script type='text/javascript'>

$(window).load(function(){
   $("body").click(function(){

        var s = window.getSelection();
        s.modify('extend','backward','word');
        var b = s.toString();

        s.modify('extend','forward','word');
        var a = s.toString();
        s.modify('move','forward','character');

        var variablej=b+a; //variablej is Jquery Variable

       //how to pass a Jquery variable to php variable
      <?php   $variablephp = "<script>document.write(variablej)</script>"   ?> //variablephp is php variable

<?php $result = mysql_query("SELECT * FROM translate where English='$variablephp'"); ?>

</script>

Posted
Comments
didiiiiiii.7 18-Sep-15 10:51am    
Hello,

Did you find a solution for this issue? I've just faced this and cannot find any info in the web..

Thanks,
Didi

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900