I want to add script code in php but it giving error on this line
$a=echo "document.getElementById('t1').value;";
of unexpected use of ECHO! Can any one help???
<?php
    echo "<script>";
    $a=echo "document.getElementById('t1').value;";
    if($_session['user']==$a) {
        echo 'function fun() {
            document.write("welcom");
        }';
    }
    echo "</script>";
?>
 
     
     
    