dragunu Posted January 9, 2007 Share Posted January 9, 2007 Hello,is it possible to actually get a php script working once clicking a link? forexample i have the following links: John , Peter , Robert.Now , whichever name i click, i get directed to lets say "script.php" , however on that script i get printed out the name of the link i clicked.thanks a lotdragunu Link to comment https://forums.phpfreaks.com/topic/33442-solved-php-script-on-clicking-a-link/ Share on other sites More sharing options...
papaface Posted January 9, 2007 Share Posted January 9, 2007 Yes. Use GET. e.g.Link page:[code]<a href="script.php?name=John">John</a> , <a href="script.php?name=Peter">Peter</a> , <a href="script.php?name=Robert">Robert</a>.[/code]script.php[code]<?php$name = $_GET['name'];echo $name;?>[/code] Link to comment https://forums.phpfreaks.com/topic/33442-solved-php-script-on-clicking-a-link/#findComment-156563 Share on other sites More sharing options...
dragunu Posted January 9, 2007 Author Share Posted January 9, 2007 thanks:) Link to comment https://forums.phpfreaks.com/topic/33442-solved-php-script-on-clicking-a-link/#findComment-156581 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.