Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Player Added!</title>
- <META HTTP-EQUIV="Refresh"
- CONTENT="2; URL=/site/admin.php">
- </head>
- </html>
- <?php
- $con = mysql_connect("sql307.byethost10.com", "b10_5696492", "stock42");
- if (!$con)
- {
- die('Could not connect: ' . mysql_error());
- }
- mysql_select_db("b10_5696492_eashl", $con);
- $game="INSERT INTO game_stats (game_id, team_home, abbr_home, shots_home, hits_home, faceoff_home, toa_home_min, toa_home_sec, pim_home, ppa_home, ppg_home, team_away, abbr_away, shots_away, hits_away, faceoff_away, toa_away_min, toa_away_sec, pim_away, ppa_away, ppg_away )
- VALUES
- ('$_POST[game_id]','$_POST[team_home]','$_POST[abbr_home]','$_POST[shots_home]','$_POST[hits_home]','$_POST[faceoff_home]','$_POST[toa_home]','$_POST[pim_home]','$_POST[ppa_home]','$_POST[ppg_home]','$_POST[team_away]','$_POST[abbr_away]','$_POST[shots_away]','$_POST[hits_away]','$_POST[faceoff_away]','$_POST[toa_away]','$_POST[pim_away]','$_POST[ppa_away]','$_POST[ppg_away]')";
- if (!mysql_query($game ,$con))
- {
- die('Error: ' . mysql_error());
- }
- echo "Game Successfully Added Into Database";
- $playerstats="INSERT INTO player_stats (playerid, game_id, gamertag, goals, assists, plus_minus, sog, ppg, shg, pim, hits)
- VALUES
- ('$_POST[playerid]','$_POST[game_id]','$_POST[gamertag]','$_POST[goals]','$_POST[assists]','$_POST[plus_minus]','$_POST[sog]','$_POST[ppg]','$_POST[shg]','$_POST[pim]','$_POST[hits]')";
- if (!mysql_query($playerstats ,$con))
- {
- die('Error: ' . mysql_error());
- }
- echo "Player Stats Successfully Added Into Database";
- $goaliestats="INSERT INTO goalie_stats (playerid, game_id, gp, gamertag, min, win, loss, otl, ga, sa, sv, a, so)
- VALUES
- ('".$_POST[playerid]."','".$_POST[game_id]."','".$_POST[gp]."','".$_POST[gamertag]."','".$_POST[min]."','".$_POST[win]."','".$_POST[loss]."','".$_POST[otl]."','".$_POST[ga]."','".$_POST[sa]."','".$_POST[sv]."','".$_POST[a]."','".$_POST[so]."')";
- if (!mysql_query($goaliestats ,$con))
- {
- die('Error: ' . mysql_error());
- }
- echo "Player Stats Successfully Added Into Database";
- mysql_close($con)
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement