#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Location
    Germany
    Posts
    2
    Rep Power
    0
    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. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 1999
    Location
    Netherlands
    Posts
    77
    Rep Power
    16
    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
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Location
    Germany
    Posts
    2
    Rep Power
    0
    [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 ).
    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

Similar Threads

  1. Invalid characters with PHP and MySQL
    By gio50000 in forum MySQL Help
    Replies: 2
    Last Post: November 18th, 2004, 09:59 AM
  2. blank screen when using php & mySQL database
    By bigzane in forum PHP Development
    Replies: 7
    Last Post: November 14th, 2003, 10:13 PM
  3. Cronjob madness
    By eliteboo in forum Linux Help
    Replies: 10
    Last Post: July 14th, 2003, 11:49 AM
  4. mySQL or PHP or configuration bug?
    By kurt|ss- in forum MySQL Help
    Replies: 6
    Last Post: July 2nd, 2003, 11:59 AM
  5. Replies: 8
    Last Post: September 11th, 2002, 09:59 AM

IMN logo majestic logo threadwatch logo seochat tools logo