consider following html code :
<html>
<body>
<p>
<a href="topic.php"&username value="sachin">
</a>
</body>
</html>
</p>
how do i access this $username variable in topic.php
accessing link attributes..
Moderator: General Moderators
accessing link attributes..
Last edited by ps_sach on Fri Mar 14, 2008 12:45 am, edited 1 time in total.
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: accessing link attributes..
Code: Select all
<html>
<body>
<p>
<a href="topic.php?username=sachin">Topic</a>
</p>
</body>
</html>Code: Select all
<?php
echo "username=" . $_GET['username'];(#10850)
Re: accessing link attributes..
Thanks! I have tried it & it works....arborint wrote:topic.phpCode: Select all
<html> <body> <p> <a href="topic.php?username=sachin">Topic</a> </p> </body> </html>http://www.php.net/manual/en/language.v ... efined.phpCode: Select all
<?php echo "username=" . $_GET['username'];