Click here to Skip to main content
15,908,020 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi.. Friends I have a HTML page, I am using php code in it

HTML
<html>
<head>

</head>
<body>
<h1>This is HTML Page</h1>
 <?php echo My name.$_GET['name']
 echo('Hello')
 ?>
</body>
</html>


Actually I want to get the value of querystring name without java script and jquery. Its not work for me.

Please tell me where I am wrong or another alternative way to get querystin value in html page

Thanks & Regards
Parveen Rathi
Posted
Updated 13-Jun-12 1:03am
v3

1 solution

C#
$(document).ready(function () {

    //        alert('jq loaded');
    var sParam = getParameterByName('pvalue');
 

});

function getParameterByName(name) {
    var match = RegExp('[?&]' + name + '=([^&]*)')
                .exec(window.location.search);
    return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
}



using jquery we can get the query string parameter .Here "pvalue" is the query string parameter
 
Share this answer
 

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