Hi

below code prints tempnum correctly but not tempname. Kinly look into this.

<html>
<head>
    <script type="text/javascript" src="jquery-2.0.3.min.js"></script>
    <script type="text/javascript">
                    $(document).ready(function(){
                    $(".mylinktempnum").click(function(){
                        alert($(this).attr('href').match(/tempnum=([0-9]+)/)[1]);
                        *alert($(this).attr('href').match(/tempname=([a-z]+)/)[1]);*

                    });
                    });
    </script >

</head>
<body>
</body>
</html>


<?php
<a class=\"mylinktempnum\" href=\"home.php?tempnum=$num&tempname=$name\"></a>
?>
Member Avatar
diafol

Have a look at the php.net manual about how to echo / print to the screen. I'm surprised you didn't get an error - or did you?

i didn't get any error.got the tempnum correctly but not tempname

Member Avatar
diafol
<?php
<a class=\"mylinktempnum\" href=\"home.php?tempnum=$num&tempname=$name\"></a>
?>

Shouldn't echo to the screen as you have no echo or print

You don't show where your $num and $name are coming from. So if $name is not set properly then tempname will not show.