0

Help me how to built this php?

I want to attach a string value of php to an link <a> tag in html.so when i click on it i would have that value on that link. for eg: <a href="abc.php">link1</a> <a href="abc.php">link2</a> link 1 should retrun $a as 1 and link 2 should retrun $a as 2, please let me know how can i do it

23rd Dec 2017, 8:19 PM
Sabin Shrestha
Sabin Shrestha - avatar
5 Réponses
0
just write 1 and 2 on the place of link 1 and link2
24th Dec 2017, 9:31 AM
Yesh Jadav
Yesh Jadav - avatar
0
#yesh i meant to retrun a value of $a string 1 to page abc.php
25th Dec 2017, 1:17 AM
Sabin Shrestha
Sabin Shrestha - avatar
0
just make any function as it is an header file having void but it will no return any value then go with int bcoz it will return value <?php function foo() { return "tel:762347723447" } ?> <a href= '<?php echo foo(); ?>'> <img src="images/image1" alt="Preview1" /> </a>
25th Dec 2017, 5:52 AM
Yesh Jadav
Yesh Jadav - avatar
0
You didnt catch me i gess
25th Dec 2017, 9:39 AM
Sabin Shrestha
Sabin Shrestha - avatar
0
Yesh i want to pass value of $a to another page when link1 is clicked to an abc.php
25th Dec 2017, 9:40 AM
Sabin Shrestha
Sabin Shrestha - avatar