[Solved] How can i get javascript variable to store in php? [duplicate]


Pl. try this code   
 <html>
    <head>
    <script type="text/javascript">
       var q=document.getElementById("val").value;
        //document.write(q);

    </script>
    </head>
    <body>



    <input type="hidden" value="nis" id="val"></body>

    <script type="text/javascript">
       var q=document.getElementById("val").value;
        document.write(q);

    </script>
     <?php
          echo $ff="<script type="text/javascript">
                    document.write(q)</script>";
       ?>
    <?php echo $ff; ?>
    </html>

1

solved How can i get javascript variable to store in php? [duplicate]