Can you pls let me know how can this be achieved
$(document).ready(function(){
id = "user";
$( '#login' ).html( "<a href = http://localhost/Misc/Receive.php?
id=+id>Test </a>" );
Receive.php $val = $_GET['id'];
echo($val);
want to pass the value stored in variable id to receive.php
-
Thank You Suchit. It works now.Ram– Ram2017年02月25日 06:11:18 +00:00Commented Feb 25, 2017 at 6:11
-
then you can accept the answer by checking the checkmark.Suchit kumar– Suchit kumar2017年02月25日 07:39:42 +00:00Commented Feb 25, 2017 at 7:39
1 Answer 1
Quotes are not proper,change your string to this:
$( '#login' ).html( "<a href = http://localhost/Misc/Receive.php?id="+id+">Test </a>" );
answered Feb 25, 2017 at 5:54
Suchit kumar
11.9k3 gold badges26 silver badges46 bronze badges
Sign up to request clarification or add additional context in comments.
Comments
default