PHP help needed! Reward given!

Discussion in 'PHP' started by NateJ, May 16, 2009.

  1. #1
    Okay, when the "kill_button" is pressed, the page simply refreshes and no action takes place once it is pressed.

    So, is there any reason why it isn't working?

    Click here to view code!

    If anyone can see what is wrong and corrects the problem and makes this work, i will reward that person with $10 for correcting the problem.

    Thankyou,
    NateJ
     
    NateJ, May 16, 2009 IP
  2. xxKillswitch

    xxKillswitch Peon

    Messages:
    331
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Visiting link leads me back to index. Send me PM and I can help you fix this.
     
    xxKillswitch, May 16, 2009 IP
  3. NateJ

    NateJ Active Member

    Messages:
    240
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #3
    Corrected that page, PM has been sent, however, you've went offline :(
     
    NateJ, May 16, 2009 IP
  4. Sky AK47

    Sky AK47 Member

    Messages:
    298
    Likes Received:
    8
    Best Answers:
    1
    Trophy Points:
    45
    #4
    Can you put the code between the PHP syntax, I can't see what you mean with this.
     
    Sky AK47, May 17, 2009 IP
  5. NateJ

    NateJ Active Member

    Messages:
    240
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #5
    Sorry, I don't know what you mean by that...
     
    NateJ, May 17, 2009 IP
  6. Sky AK47

    Sky AK47 Member

    Messages:
    298
    Likes Received:
    8
    Best Answers:
    1
    Trophy Points:
    45
    #6
    Well, the page is currently showing the whole, it isn't executing it, so.
    Put <?php at the beginning and ?> at the end.
     
    Sky AK47, May 17, 2009 IP
  7. aaron d.

    aaron d. Peon

    Messages:
    37
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #7
    A few notes which may or may not help:

    In the snippet:

    1. There is no "kill_button"
    2. $username is never set.
    3. Sometimes you use $kill_username and sometimes $target->user. Are these interchangeable?

    Without access to all the code and the database, the only thing I can suggest is that you echo the data before decision points, so you know the correct information is being passed.
     
    aaron d., May 17, 2009 IP
  8. NateJ

    NateJ Active Member

    Messages:
    240
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #8
    kill_button was renamed to "kill".
    $username is set in another part of the script.
    $kill_username and $target->username are pretty much the same i guess.

    I've also noticed that it all works up until:
    elseif ($fetch->location == $target->location){
    PHP:
    I can give access to the whole script if need be, PM me if you're still interested in helping.

    Thanks,
    NateJ
     
    NateJ, May 17, 2009 IP
  9. NateJ

    NateJ Active Member

    Messages:
    240
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #9
    Thread Closed.

    Problem Solved!

    Sorry for double post.
     
    NateJ, May 17, 2009 IP