I need to be able to call a variable after a link has been clicked to be used later in the script. Something like this.
CODE
while($rows = mysql_fetch_array($result)){
print "<a href='testlink.php?action=author' title='$rows[author]' name='author' value='$rows[author]'>$rows[author]</a>";
}
switch($_GET[action]){
case "author":
$sname="$_GET[author]";
print $sname;
break;
default:
include_once("testlink.php");
break;
}
print "<a href='testlink.php?action=author' title='$rows[author]' name='author' value='$rows[author]'>$rows[author]</a>";
}
switch($_GET[action]){
case "author":
$sname="$_GET[author]";
print $sname;
break;
default:
include_once("testlink.php");
break;
}
I know the $GET wont work on the "name" & "value" variables in the link. I only wrote it like this to show you what I want to do. Is there a way to call a variable from a link?