Using querystrings to increment a counter
Posted: Mon Feb 06, 2006 11:04 am
hawleyjr | Please use
I see that the code is fundamentally flawed, but am not sure where to start correcting it. Any help would be greatly appreciated.
Thanks!
hawleyjr | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
Greetings board members!
What I'm trying to do at first seemed very simple, but I'm having quite a difficult time accomplishing the task. I am attempting to have a counter start at zero, and every time a link is clicked (which references the current page), have the counter increment by 1. For instance, here's the code I started with:Code: Select all
<?
$x = $GET_["counter"];
$x ++;
echo "<a href=test.php?counter=1>Add One</a>"
?>Thanks!
hawleyjr | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]