Results 1 to 2 of 2

Thread: Need help with the confusing PHP and jquery functionality

  1. #1
    Join Date
    Jun 2013

    Need help with the confusing PHP and jquery functionality

    I'm trying to create a fantasy game website (yeah ..like fantasy football).
    For 2 weeks i was wondering how should i create a webpage for the change(transfers) of players in the user team.

    i'll explain. user will be able to sign up and login, which i've done. then he will create his own team by selecting 10 players from pool of players.

    So i created a database design (in phpmyadmin) and now i'm stuck at the webpage where user will select players.
    In this page, i displayed the available players (pool of players) using php and html table. Now I know, here i'll need some jquery.

    Like, when user clicks a players it should be added to his team.
    So, here're my problems...

    1)How to display selected players (10 players whom user'll select ).
    I thought of using html table. Means players will move from 1 html table (table of all players) to another (user team).
    and i tried too but it becomes more complicated. Is there any other solution to this??

    2)how to put selected 10 players in the DB?

    Pls help with this.
    i'll provide more info (like code) if you want.

    thanks in advance.

  2. #2
    Join Date
    Mar 2013
    Iasi, Romania
    So, you have to use a lot of jQuery.
    You could display the pool of players with action listeners(onclick let's say) and when the user selects one, you should add it to an array in and you should fill a div selected by id...it gets complicated here, but I hope it gives you an idea about what you have to do
    It is a lot more to do, like removing player, removing all players and so on, but i don't have the time to explain them all in detail.
    As for saving the team, you could pass that array via AJAX request to a PHP script, where you will do your magic.
    I'm sorry I keep looking at your chest while you're talking. It's just so beautiful. What is it, oak?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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