Jump to content

Tough Problem.. Php, javascript and html.


haku87

Recommended Posts

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

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.