ONLCLICK hyperlink : how to??
Posted: Mon Jul 28, 2008 10:10 am
hey guys,
How to insert a function into a hyperlink ?. Such as, i want to insert
a "setcookie" function in the hyperlink code like below
<a href="newpage.php?name=<?php echo urlencode($hello);?>">
<?php
$hour = time() + 3600;
echo '<p>' .$list['name']. '</p>';
setcookie(getname, list['name'], $hour);
?></a>
so that i could recall the cookie in the newpage.php once the user click the hyperlink, but i dont know to put ONCLICK function in the middle of the hyperlink code....please help me...
thanks guys!
Azhan
How to insert a function into a hyperlink ?. Such as, i want to insert
a "setcookie" function in the hyperlink code like below
<a href="newpage.php?name=<?php echo urlencode($hello);?>">
<?php
$hour = time() + 3600;
echo '<p>' .$list['name']. '</p>';
setcookie(getname, list['name'], $hour);
?></a>
so that i could recall the cookie in the newpage.php once the user click the hyperlink, but i dont know to put ONCLICK function in the middle of the hyperlink code....please help me...
thanks guys!
Azhan