|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
I use the following small programm as a linkcounter:
It works, but there is a bug in it I cannot kill: <?php mysql_connect("localhost"); $identid =mysql_db_query("test","select votes from counting WHERE (name='Jana')"); while($line = mysql_fetch_row($anweisungsid)) { $votes = $line[0] + 1; } mysql_query("update counting SET votes='$votes' WHERE (name = 'Jana')"); echo "<TABLE><TR><TD WIDTH=70% VALIGN='top'><H3>Jana:</H3></TD><TD VALIGN='top' WIDTH=30%><SPAN STYLE=color:red><H3>$votes</H3></SPAN></TD></TR></TABLE>"; include("link.html") ?> When you start it works fine. Click on the girl number 1 and her votes will be increased. Click next on the girl numer 2 and her votes will be increased. Click next on the girl number 3 and her votes will be increased. BUT NOW: If you click on whatever girl her votes will NOT be increased. Only if you click again on the same girl her votes will be increased. If you click once again on her it will increase her votes again. So what is it? Any help would be very much appreciated. You can find the website on www.hookers.de. (Link on the left side: PHP-SQL) The direct link is www.hookers.de/phpsites/php_frame.html |
|
#2
|
|||
|
|||
|
Hi Toxicbuddha,
The only thing I can see is that you must not mix up english and german ids: >>$identid =mysql_db_query >>while($line = mysql_fetch_row($anweisungsid)) PHP only understands PHP and did not learn any other languages! ![]() Happy coding, Peter |
|
#3
|
|||
|
|||
|
[QUOTE]Originally posted by PAV:
[B]Hi Toxicbuddha, The only thing I can see is that you must not mix up english and german ids: >>$identid =mysql_db_query >>while($line = mysql_fetch_row($anweisungsid)) hi peter, the original code is not mixed up, I wanted to "translate" the code for english readers when I posted it, otherwise it would have not work at all, I suppose URL). but thanxs for your hint nevertheless. I have seen in the meantime that with simple html-coding <meta http-equiv="expires" content="0"> the script works fine on windows98 with apache - but not on the unix server. toxicbuddha |
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > Beginner: bug in linkcounter (using mysql and php) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|