Jump to content

chriscloyd

Members
  • Posts

    488
  • Joined

  • Last visited

Everything posted by chriscloyd

  1. i hope someone understands what im trying to get at
  2. no this is what im doing <?php mysql_connect("localhost","*****",'*****'); mysql_select_db("*****"); $get_teams = mysql_query("SELECT * FROM teams WHERE game = 'cs16' AND division = 'a'") or die(mysql_error()); $teamname = array(); $teamcount = 1; while ($teams = mysql_fetch_array($get_teams)) { $teamname[] = $teams['teamname']; } foreach ($teamname as $data) { $t = $data //can i do this somehow //like mane a new variable where the teamname from $t is added into the variable $t_n_$t = $teamcount; $teamcount++; } ?>
  3. say you have already set one variable like so $teamname = $teams['teamname']; then can you do this $team + $teamname = 1; ?????
  4. this is what i get hmmm 1 45 12 4 58 684 51 6 8 7 21 67 doesnt really work the right way hmmm im doing it while getting info from database $get_all_players = mysql_query("SELECT * FROM users WHERE team1 OR team2 OR team3 = 1 "); then do a while statement so i can show each user
  5. i need help creating a new row for a table say i have 8 teams i want three coloums made then when it shows three make a new row this is all i can think of <?php if ($pic_num == 1) { echo '<tr>'; } if ($pic_num == 4) { echo '<tr>'; } if ($pic_num == 7) { echo '<tr>'; } if ($pic_num == 10) { echo '<tr>'; } if ($pic_num == 13) { echo '<tr>'; } ?> im just so lost on how to do this my meds are driving me crazy
  6. sry actually i have this now Array ( [0] => Array ( [away] => [home] => Array ( [tid] => 2 [teamname] => 2 [irc] => [website] => [tag] => [bio] => [picture] => [wins] => 0 [draws] => 0 [losses] => 0 [manager] => [leader] => [scheduler] => [roundswon] => 0 [roundslost] => 0 [password] => [location] => [game] => cs16 [division] => a ) ) [1] => Array ( [away] => [home] => Array ( [tid] => 3 [teamname] => 3 [irc] => [website] => [tag] => [bio] => [picture] => [wins] => 0 [draws] => 0 [losses] => 0 [manager] => [leader] => [scheduler] => [roundswon] => 0 [roundslost] => 0 [password] => [location] => [game] => cs16 [division] => a ) ) [2] => Array ( [away] => [home] => ) [3] => Array ( [away] => [home] => ) [4] => Array ( [away] => Array ( [tid] => 1 [teamname] => unleash the beast inside [irc] => none [website] => none [tag] => utbi [bio] => [picture] => [wins] => 0 [draws] => 0 [losses] => 0 [manager] => pro[L]ax [leader] => pro[L]ax [scheduler] => pro[L]ax [roundswon] => 0 [roundslost] => 0 [password] => ****** [location] => Pacific [game] => cs16 [division] => a ) [home] => ) )
  7. hmmm im lookin and still Array ( )
  8. this is all i get back Array ( )
  9. i have tried that sir but i can not get all the teams into an array i have tried
  10. i have been trying for weeks and nothing seems to work
  11. no im trying ill show u my code <?php $get_allteams = mysql_query("SELECT * FROM teams WHERE game = 'css' AND division = 'a'"); $num_teams = mysql_num_rows($get_allteams); $max_teams = $num_teams; $min_teams = 1; while ($teams = mysql_fetch_assoc($get_allteams)) { $get_home_team = rand($min_teams,$max_teams); $get_away_team = rand($min_teams,$max_teams); } ?> but thats all i got i dont know what to do if they are the same and how to go back and choose a new number or to check if they have already been matched up previous matches or if they have already been matched up to a dif team this week
  12. this is what the script needs to do their is 10 teams take a team and match them up with another team it checks previous matches and see if it was previsouly matched up with that team if not make a match in the match table? if confused ask questions please need help
  13. my .htaccess file is not working and i keep getting this error Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Apache/2.2.3 (Debian) DAV/2 SVN/1.4.2 PHP/5.2.0-8+etch13 mod_ruby/1.2.6 Ruby/1.8.5(2006-08-25) mod_ssl/2.2.3 OpenSSL/0.9.8c Server at spec-gaming.com Port 80 this is what my .htaccess code is RewriteEngine On RewriteRule ^([^/]*)$ /index.php?p=$1 RewriteRule ^([^/]*)/([^/]*)$ /index.php?p=$1&game=$2 RewriteRule ^([^/]*)/([^/]*)/([^/]*)$ /index.php?p=$1&game=$2&division=$3 RewriteRule ^([^/]*)/([^/]*)/([^/]*)/([^/]*)$ /index.php?p=$1&game=$2&division=$3&module=$4 RewriteRule ^([^/]*)/([^/]*)$ /index.php?p=$1&teamname=$2
  14. maybe i should explian it better team 10 teams and create five matches check to see if teams have been matched up already in previous weeks or see if they are already matches up agasint a different team this week
  15. Okay well i dont want to create a match for everyone for example i will run the match creator once a week for each season then when i run it say there is 10 teams the ten teams will be matched to other teams that they have not played questions? please help
  16. i did a loop but it just keep choosing the same numbers
  17. I'm pretty good with coding but am getting stumphed. IDEA - Automatch teams count how many teams are in the teams table then choose two of them and insert them into the match table but if they are already in there choose two different numbers and do this till all the teams have been scheduled a match
  18. $result = mysql_query("SELECT * FROM links WHERE `id` = '".$id."' ") or die(mysql_error()); while( $r = mysql_fetch_array($result) or die(mysql_error())) { //info here } also make sure you have set the $id
  19. well that could work yes and they could get the ip address if they know your the one
  20. Ya I would personaly store each story in a database so say when you upload a photo with the size of 1124kb .gif <?php $size1 filesize("me.gif"); //mysqlconnect up here $get_story = mysql_query("Select * From story where size = '".$size1."' "); $story = mysql_fetch_assoc($get_story); echo $story['story']; ?>
  21. if you create a database make a table called users then make these fields username uid password email do it that way then you can enter the information you want and try to login by fetching the info from the database
  22. Proxy can get around it and what not the best best would to have a login script I can help you with
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.