Hello,
I have a piece of code I am trying to resolve and I believe it has something to do with using a newer version of PHP or MySQL than the code was developed on. The function that this code is doing works fine, I just get the error message. Here is the error and the code:
GENERAL INFO
Platform: Windows 2003
PHP Version 4.4.4
MySQL Version: 5.2.0 (Windows) running on same machine as PHP script.
ERROR MESSAGE
Notice: Undefined variable: counter in c:\inetpub\wwwroot\assets\servers.php on line 95
CODE - I typed the line numbers to the left for reference
94: while($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
95: if($counter++ % 2 == 0){
96: $td = "even";
97: }else{
98: $td = "odd";
99: }
100: echo"<tr>
101: <td class='$td'><a href='editserver.php?id=$row[id]'>Edit</a></td>