thanks, Mike and Ken
first off, I'm not using a form (so no POST); the link is in an anchor tag. I
could put a form around it, but that seems to me making a simple link complex.
I want to run this php code when the link is clicked
$webpage="";
$link_clicked="";
Function capture_click($webpage,$link_clicked)
{
$entry_date=date("m-d-y-H-i");
$sql = "INSERT INTO click_details " .
"SET webpage='$webpage', link_clicked='$link_clicked',
entry_date='$entry_date'";
$ok = mysql_query($sql);
if ($ok) {
//error checking
}
}
?>
and then the anchor text (or how I guessed would work)
<a href=www.nyphp.org onclick="<?php
capture_click(name_of_my_webpage,link_name); ?>";>info on PHP</a>
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk
NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com
Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php