Do you want your users to be automatically added to the league they chose without admin approval? If so, have a look at point 2 in this post.
Well, that is something useful but nog what i want. Maybe i’m not explaining it very well.
When a user wants to change from the standard league to another league, they have to go to their settings in their profile.
I want this out of the settings and put it on a seperate page where i can redirect the users to.
well, when i’m looking around for an solution, maybe it’s the best option you refer to.
But now the problem. How can i add to the register form an option to select a legaeu? Also with the option where i don’t have to approve someone to an leageau?
my site: http://www.ahvoetbalpoule.nl
register page
Another option,
Is it possible to edit this code:
<?php
if(!isset($_POST['change_league'])){
//if the form has not been submitted yet, display the form
echo "<form name='myform' action='' method='POST'>";
//Get array of leagues
$pool = new Football_Pool_Pool;
$leagues = $pool->get_leagues(true);
//Make a drop down
echo "<select name='league'>";
foreach($leagues as $league){
echo "<option value='{$league['league_id']}'>{$league['league_name']}</option>";
}
echo "</select>";
echo "<input type='submit' name='change_league' value='Submit'>";
echo "</form>";
}else{
//If the form has been submitted, run the PHP function to update database
$pool = new Football_Pool_Pool;
$pool->update_league_for_user(get_current_user_id(), $_POST['league']);
echo "Database updated!";
}
?>
Where the current poule of the user is shown and when it is not correct he can adjust it?