haku87 Posted March 21, 2007 Share Posted March 21, 2007 I got this problem. I need to set a certain variable after I click on a link. Eg. <a href = "test.php" target="expand">Test</a> I wan the user when click on test.php. It will automatically change $arr = 9. Is it possible? Only when the user click on the link. AnDe Thanks for ur help Link to comment https://forums.phpfreaks.com/topic/43678-tough-problem-php-javascript-and-html/ Share on other sites More sharing options...
UTAlan Posted March 21, 2007 Share Posted March 21, 2007 PHP variables are stored on the server, so you would have to reload the page if you wanted to update their values. You could use javascript to keep up with how many times it was clicked and pass that to the next page where you would increment your variable appropriately. Link to comment https://forums.phpfreaks.com/topic/43678-tough-problem-php-javascript-and-html/#findComment-212037 Share on other sites More sharing options...
haku87 Posted March 21, 2007 Author Share Posted March 21, 2007 My problem is that.. I using a iFrame. Submenu is generated through passing an value into a array. When the link is clicked, I wanted to load the page into that iFrame as well as change the variable in the array. Link to comment https://forums.phpfreaks.com/topic/43678-tough-problem-php-javascript-and-html/#findComment-212118 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.