SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Apr 2003
    Location
    Seattle
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I need help with this one?

    Ok, this is what i need to do, i know it can be done because forums use it for their PM's. So here goes. First of all let me give you a little info about my site, so you have some kind of idea what this is for. My site deals with the XBOX LIVE community for the game Ghost Recon. It is a league site, that contains teams, which those teams contain players. (http://reconclanslive.com) Now I was getting complaints about team captains adding players at random to their teams through their captains options. I need to set up a system that when a captain click on Add Player that it sends that person the captain is requesting an invite. The invite is to be pulled up on the next refresh, login, etc.. I know how to accomplish all that. So I created to extra fields in my db, invite and inv_teamid. Now, if invite is equal to 0, there are no invites, if invites are equal to 1, display pop-up page with the teams name and ask that player if they would like to accept the invitation. If they click yes, it takes the variable from the inv_teamid and puts it in the players team_id. Then sets the invite back to 0. Then closes the pop-up menu. And walla. Now I know this should be fairly simple, i just don't know where to start on the pop-up. So i guess basically that is what I am asking.

    Any help is greatly appreciated!

    Thanks,
    Colin

  2. #2
    if($awake){code();} PHP John's Avatar
    Join Date
    Jul 2002
    Location
    Along the Wasatch Fault line.
    Posts
    1,771
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You will need some JavaScript, and a call to the database upon login (or cookie value, depending on how you have it set up)

    Then if the value from the db is > 0 then you echo the JavaScript to create the popup window, pass a value from the JS to the server. Based on the response, manipulate the database as you need (move the data, or delete it).

    However, I'm just now in the process of learning JS, but the above is a fairly simple explaination of how I would go about it.
    John

  3. #3
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's the right idea about using PHP to echo out the Javascript you need to pop up a window.

    This pop up window would then deal with the database/logic side of things as you've figured out - ReconClan - though to close up the pop up window, you'd need to remember to echo out something like this:

    PHP Code:
    self.close(); 
    using PHP on finding the invite is 0. If you need some Javascript help, just let me know.

  4. #4
    SitePoint Member
    Join Date
    Apr 2003
    Location
    Seattle
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I got it all figured out but thanks for your help...Very much appreciated. Just took some extra thinking on my part. Thanks again.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •