Page 1 of 1

accessing link attributes..

Posted: Fri Mar 14, 2008 12:13 am
by ps_sach
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

Re: accessing link attributes..

Posted: Fri Mar 14, 2008 12:29 am
by Christopher

Code: Select all

<html>
<body>
<p>
<a href="topic.php?username=sachin">Topic</a>
</p>
</body>
</html>
topic.php

Code: Select all

<?php
echo "username=" . $_GET['username'];
http://www.php.net/manual/en/language.v ... efined.php

Re: accessing link attributes..

Posted: Sat Mar 15, 2008 3:25 am
by ps_sach
arborint wrote:

Code: Select all

<html>
<body>
<p>
<a href="topic.php?username=sachin">Topic</a>
</p>
</body>
</html>
topic.php

Code: Select all

<?php
echo "username=" . $_GET['username'];
http://www.php.net/manual/en/language.v ... efined.php
Thanks! I have tried it & it works....