cooldude832 Posted July 19, 2007 Share Posted July 19, 2007 I have a bunch of links that ref is the same page. Is there any way on that second page I can tell which link was clicked if my links are structured as: <html> <a href="page.php" id="link1">Link 1</a> <a href="page.php" id="link2">Link 2</a> <a href="page.php" id="link3">Link 3</a> <a href="page.php" id="link4">Link 4</a> Quote Link to comment Share on other sites More sharing options...
trq Posted July 19, 2007 Share Posted July 19, 2007 Nope... but if you used... <a href="page.php?id=link1>Link 1</a> they would show up in $_GET['id']. Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted July 19, 2007 Author Share Posted July 19, 2007 yeah I know that can be done, but this guy wants to avoid that. Only other idea i had was ajax so that it sets a session off each link and then on the next page it picks it up. Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted July 19, 2007 Author Share Posted July 19, 2007 hmm what if i tried making the links into form processers (using POST) and then i had a hidden var called linkNumber you think that work? If its post looks just like a href, but idk if that will kill the SEO on it Quote Link to comment Share on other sites More sharing options...
trq Posted July 19, 2007 Share Posted July 19, 2007 hmm what if i tried making the links into form processers (using POST) and then i had a hidden var called linkNumber you think that work? Yes its possible. but idk if that will kill the SEO on it True. Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted July 19, 2007 Author Share Posted July 19, 2007 Alright that gives me some ideas to work off of, I'm still surprised though it can't pull off the ref link ID (guess when ID become required tag it can). Even still I know scripting software like autoit can pull anchors via an index or associative key. Maybe php6 will have this option. Quote Link to comment Share on other sites More sharing options...
trq Posted July 19, 2007 Share Posted July 19, 2007 Client side languages may have more luck but put simply, the id attributes are not sent via GET, so php has no way of recieving such values. Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted July 19, 2007 Author Share Posted July 19, 2007 ahh so php will never get it until browsers decide to send <a> ids or some sort of other atributes via $_REQUEST for say Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.