Advertisement
Guest User

dfsdfsdf

a guest
Jul 14th, 2010
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.10 KB | None | 0 0
  1. <html>
  2. <head>
  3. <title>Player Added!</title>
  4. <META HTTP-EQUIV="Refresh"
  5. CONTENT="2; URL=/site/admin/admin.php">
  6. </head>
  7. </html>
  8.  
  9. <?php
  10.  
  11. error_reporting(E_ALL);
  12. ini_set('display_errors', '1');
  13.  
  14. $con = mysql_connect("******", "******", "******") or die(mysql_error());
  15. if (!$con)
  16. {
  17. die('Could not connect: ' . mysql_error());
  18. }
  19.  
  20. mysql_select_db("db_projmay3m", $con);
  21.  
  22. $game="INSERT INTO game_stats (game_id, win, loss, otl, ot, home, date_month, date_day, rank, team_home, abbr_home, p1_score_home, p2_score_home, p3_score_home, p4_score_home, score_home, shots_home, hits_home, faceoff_home, toa_home_min, toa_home_sec, pim_home, ppa_home, ppg_home, team_away, abbr_away, p1_score_away, p2_score_away, p3_score_away, p4_score_away, score_away, shots_away, hits_away, faceoff_away, toa_away_min, toa_away_sec, pim_away, ppa_away, ppg_away )
  23. VALUES
  24. ('$_POST[game_id]','$_POST[win]','$_POST[loss]','$_POST[otl]','$_POST[ot]','$_POST[home]','$_POST[date_month]','$_POST[date_day]','$_POST[rank]','$_POST[team_home]','$_POST[abbr_home]','$_POST[p1_score_home]','$_POST[p2_score_home]','$_POST[p3_score_home]','$_POST[p4_score_home]','$_POST[score_home]','$_POST[shots_home]','$_POST[hits_home]','$_POST[faceoff_home]','$_POST[toa_home_min]','$_POST[toa_home_sec]','$_POST[pim_home]','$_POST[ppa_home]','$_POST[ppg_home]','$_POST[team_away]','$_POST[abbr_away]','$_POST[p1_score_away]','$_POST[p2_score_away]','$_POST[p3_score_away]','$_POST[p4_score_away]','$_POST[score_away]','$_POST[shots_away]','$_POST[hits_away]','$_POST[faceoff_away]','$_POST[toa_away_min]','$_POST[toa_away_sec]','$_POST[pim_away]','$_POST[ppa_away]','$_POST[ppg_away]')";
  25.  
  26.  
  27.  
  28. if (!mysql_query($game ,$con))
  29. {
  30. die('Error: ' . mysql_error());
  31. }
  32. echo "Game Successfully Added Into Database";
  33.  
  34.  
  35. // ---------------------------------------------------------------------------Player 1 Stats-------------------------------------------------------------------------------------------------------------------------------
  36.  
  37.  
  38. $playerstats1="INSERT INTO player_stats (playerid, game_id, gp, gamertag, goals, assists, plus_minus, sog, ppg, shg, pim, hits)
  39. VALUES
  40. ('$_POST[playerid_1]','$_POST[game_id_1]','$_POST[gp_1]','$_POST[gamertag_1]','$_POST[goals_1]','$_POST[assists_1]','$_POST[plus_minus_1]','$_POST[sog_1]','$_POST[ppg_1]','$_POST[shg_1]','$_POST[pim_1]','$_POST[hits_1]')";
  41.  
  42. if (!mysql_query($playerstats1 ,$con))
  43. {
  44. die('Error: ' . mysql_error());
  45. }
  46. echo "Player 1 Stats Successfully Added Into Database<br />";
  47.  
  48.  
  49.  
  50. // ---------------------------------------------------------------------------Player 2 Stats-------------------------------------------------------------------------------------------------------------------------------
  51.  
  52.  
  53. $playerstats2="INSERT INTO player_stats (playerid, game_id, gp, gamertag, goals, assists, plus_minus, sog, ppg, shg, pim, hits)
  54. VALUES
  55. ('$_POST[playerid_2]','$_POST[game_id_2]','$_POST[gp_2]','$_POST[gamertag_2]','$_POST[goals_2]','$_POST[assists_2]','$_POST[plus_minus_2]','$_POST[sog_2]','$_POST[ppg_2]','$_POST[shg_2]','$_POST[pim_2]','$_POST[hits_2]')";
  56.  
  57. if (!mysql_query($playerstats2 ,$con))
  58. {
  59. die('Error: ' . mysql_error());
  60. }
  61. echo "Player 2 Stats Successfully Added Into Database<br />";
  62.  
  63.  
  64. // ---------------------------------------------------------------------------Player 3 Stats-------------------------------------------------------------------------------------------------------------------------------
  65.  
  66.  
  67. $playerstats3="INSERT INTO player_stats (playerid, game_id, gp, gamertag, goals, assists, plus_minus, sog, ppg, shg, pim, hits)
  68. VALUES
  69. ('$_POST[playerid_3]','$_POST[game_id_3]','$_POST[gp_3]','$_POST[gamertag_3]','$_POST[goals_3]','$_POST[assists_3]','$_POST[plus_minus_3]','$_POST[sog_3]','$_POST[ppg_3]','$_POST[shg_3]','$_POST[pim_3]','$_POST[hits_3]')";
  70.  
  71. if (!mysql_query($playerstats3 ,$con))
  72. {
  73. die('Error: ' . mysql_error());
  74. }
  75. echo "Player 3 Stats Successfully Added Into Database<br />";
  76.  
  77.  
  78. // ---------------------------------------------------------------------------Player 4 Stats-------------------------------------------------------------------------------------------------------------------------------
  79.  
  80.  
  81. $playerstats4="INSERT INTO player_stats (playerid, game_id, gp, gamertag, goals, assists, plus_minus, sog, ppg, shg, pim, hits)
  82. VALUES
  83. ('$_POST[playerid_4]','$_POST[game_id_4]','$_POST[gp_4]','$_POST[gamertag_4]','$_POST[goals_4]','$_POST[assists_4]','$_POST[plus_minus_4]','$_POST[sog_4]','$_POST[ppg_4]','$_POST[shg_4]','$_POST[pim_4]','$_POST[hits_4]')";
  84.  
  85. if (!mysql_query($playerstats4 ,$con))
  86. {
  87. die('Error: ' . mysql_error());
  88. }
  89. echo "Player 4 Stats Successfully Added Into Database<br />";
  90.  
  91.  
  92. // ---------------------------------------------------------------------------Player 5 Stats-------------------------------------------------------------------------------------------------------------------------------
  93.  
  94.  
  95. $playerstats5="INSERT INTO player_stats (playerid, game_id, gp, gamertag, goals, assists, plus_minus, sog, ppg, shg, pim, hits)
  96. VALUES
  97. ('$_POST[playerid_5]','$_POST[game_id_5]','$_POST[gp_5]','$_POST[gamertag_5]','$_POST[goals_5]','$_POST[assists_5]','$_POST[plus_minus_5]','$_POST[sog_5]','$_POST[ppg_5]','$_POST[shg_5]','$_POST[pim_5]','$_POST[hits_5]')";
  98.  
  99. if (!mysql_query($playerstats5 ,$con))
  100. {
  101. die('Error: ' . mysql_error());
  102. }
  103. echo "Player 5 Stats Successfully Added Into Database<br />";
  104.  
  105.  
  106. // ---------------------------------------------------------------------------Goalie Stats-------------------------------------------------------------------------------------------------------------------------------
  107.  
  108.  
  109.  
  110. $goaliestats="INSERT INTO goalie_stats (playerid, game_id, gp, gamertag, min, win, loss, otl, ga, sa, sv, a, so)
  111. VALUES
  112. ('$_POST[playerid_6]','$_POST[game_id_6]','$_POST[gp_6]','$_POST[gamertag_6]','$_POST[min_6]','$_POST[win_6]','$_POST[loss_6]','$_POST[otl_6]','$_POST[ga_6]','$_POST[sa_6]','$_POST[sv_6]','$_POST[a_6]','$_POST[so_6]')";
  113.  
  114. if (!mysql_query($goaliestats ,$con))
  115. {
  116. die('Error: ' . mysql_error());
  117. }
  118. echo "Goalie Successfully Added Into Database<br />";
  119.  
  120. mysql_close($con)
  121. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement