Jump to content

Need Help


Thesportslodge

Recommended Posts

I have a database at my site: http://www.thesportslodge.com/caps.php

 

I had to update some of the fields because they were outdated, so I went in and changed them. I don't know how to get the changes to go through, because I was not the one to originally do the site, I hired somebody. I took some screenshots of the program I am using:

 

21831695jt9.th.jpg

56104039ps5.th.jpg

 

Any help would be much appreciated.

 

Thanks,

Ryan

Link to comment
Share on other sites

What are you trying to change? If you updated something via the database, it should have gone through.

 

There are some fields that need to be changed. We haven't put in many players yet, but I needed to add new fields because Madden 2008 has more ratings than Madden 07. So I went in to the database and changed the fields, but they aren't updating on the main site. I deleted all of the old ones to see if that would work but it didn't.

Link to comment
Share on other sites

Also, I was directed here by somebody on another site who said that I have to get the php code to that directly links the html to the database. He said he couldn't write the code for me, but I may be able to find help here. I'm pretty much a n00b at this stuff, so I'm not even sure if that's a lot of work. I'm not looking for someone to go out of their way to do anything, just maybe some direction.

Link to comment
Share on other sites

Well, if it's not changing the information on your site after physically changing the information in the database then you are probably changing the wrong data. Have you looked at the code and made sure you are in the right table? Unless you post some of the code it's hard to tell whats going on, but from the looks of it you are in the wrong table.

Link to comment
Share on other sites

That means that you forgot to add a variable in like an insert query. Here is an example:

 

INSERT INTO table_name (col1, col2, col3) VALUES ('$val1', '$val2', MISSING VALUE)

 

So there are 3 columns and only 2 values. So make sure it is even on both sides.

 

Where would this be? in the database itself or one of the other files?

Link to comment
Share on other sites

In here?

 

$row = mysql_fetch_array($result);
$information = array("Name", "Age", "College", "Team", "Position", "Jersey #", "Years Pro", "Hand");
$appearance = array("Height", "Weight", "Skin", "Hair Color", "Hair Style", "Face", "Face Shape", "Left Tattoo", "Right Tattoo");
$equipment = array("Helmet", "Facemask", "Visor", "Eye Paint", "Nasal Strip", "Mouth Piece", "Neck", "R Elbow", "L Elbow", "R Wrist", "L Wrist", "R Hand", "L Hand", "Long Sleeve", "Left Knee", "Right Knee", "Left Ankle", "Right Ankle", "Shoes");
$attributes = array("overall", "strength", "agility", "speed", "accel", "awareness", "catching", "carrying", "throwpower", "throwacc", "kickpower", "kickacc", "tackling", "passblocking", "runblk", "jumping", "kick return", "brktack", "elusiveness", "BC Vision", "stiff arm", "spin", "juke", "impact blocking", "run block strength", "run block footwork", "pass block strength", "pass block footwork", "power moves", "finesse moves", "block shedding", "pursuit", "play recognition", "man coverage", "zone coverage", "spectacular catch", "catch in traffic", "route running", "hit power", "press", "release", "injury", "stamina" , "toughness");
?>
</p>
<table width="300px" border="0" cellspacing="0" cellpadding="0" class="table">
  <tr>
    <td>Creator:</td>
    <td><?php echo($row[1]); ?></td>
  </tr>
  <tr>
    <td> </td>
    <td> </td>
  </tr>
  <?php

Link to comment
Share on other sites

Change

 

mysql_query("INSERT INTO madden ($fields) VALUES($values)")
or die(mysql_error());

 

To

<?php

$query = "INSERT INTO madden ($fields) VALUES ($values)";
$result = mysql_query($query)or die(mysql_error() . "<p>With Query:<br>$query");

?>

 

Copy and paste whatever you see on the screen. If it doesn't show anything different, then it's the wrong query.

Link to comment
Share on other sites

:-\ :-\

 

No dice. And it's the only mysql query that has insert.

 

This is the whole section of coding that isn't working:

if($_GET['list'] == "madden") { ?>
  <?php
// connect to db
include("include/connect.php");

$sel = mysql_fetch_array(mysql_query("SELECT * FROM madden WHERE id='$_GET[id]'"));

// $column_result is used to get the ids and names of all players in the table
$column_result = mysql_query("SELECT name FROM madden")
or die(mysql_error());

// check if user is at madden.php
$k = 0;
while($column = mysql_fetch_array($column_result)) {
  $myColumn[$k] = $column['name'];
  $k++;
}
if($_GET[id] == NULL) {
echo("<table width=\"300\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
  <td><h3>Madden</h3></td>
</tr>");
for($j=0; $j<count($myColumn); $j++) {
echo("
  <tr>
    <td><a href=\"caps.php?list=madden&id=".($j + 1)."\">".$myColumn[$j]."</a></td>
  </tr>");
  }
echo("
</table>
</div>
</body>
</html>");
exit;
}

// check if the user is choosing an existing player
if(!is_numeric($_GET[id]) or !$sel) {
echo("No such player..");
exit;
}
// $result is used to get the information in the row of the player with id specified in url
$result = mysql_query("SELECT * FROM madden WHERE id='".$_GET[id]."'")
or die(mysql_error());

$row = mysql_fetch_array($result);
$information = array("Name", "Age", "College", "Team", "Position", "Jersey #", "Years Pro", "Hand");
$appearance = array("Height", "Weight", "Skin", "Hair Color", "Hair Style", "Face", "Face Shape", "Left Tattoo", "Right Tattoo");
$equipment = array("Helmet", "Facemask", "Visor", "Eye Paint", "Nasal Strip", "Mouth Piece", "Neck", "R Elbow", "L Elbow", "R Wrist", "L Wrist", "R Hand", "L Hand", "Long Sleeve", "Left Knee", "Right Knee", "Left Ankle", "Right Ankle", "Shoes");
$attributes = array("overall", "strength", "agility", "speed", "accel", "awareness", "catching", "carrying", "throwpower", "throwacc", "kickpower", "kickacc", "tackling", "passblocking", "runblk", "jumping", "kick return", "brktack", "elusiveness", "BC Vision", "stiff arm", "spin", "juke", "impact blocking", "run block strength", "run block footwork", "pass block strength", "pass block footwork", "power moves", "finesse moves", "block shedding", "pursuit", "play recognition", "man coverage", "zone coverage", "spectacular catch", "catch in traffic", "route running", "hit power", "press", "release", "injury", "stamina" , "toughness");
?>
</p>
<table width="300px" border="0" cellspacing="0" cellpadding="0" class="table">
  <tr>
    <td>Creator:</td>
    <td><?php echo($row[1]); ?></td>
  </tr>
  <tr>
    <td> </td>
    <td> </td>
  </tr>
  <?php
  for($i = 0; $i < count($information); $i++) {
  echo("  <tr>
    <td>".$information[$i].":</td>
    <td>".$row[$i + 1 + 1]."</td>
  </tr>\n");
}
?>
  <tr>
    <td> </td>
    <td> </td>
  </tr>
  <?php
  for($i = 0; $i < count($appearance); $i++) {
  echo("  <tr>
    <td>".$appearance[$i].":</td>
    <td>".$row[$i + count($information) + 1 + 1]."</td>
  </tr>\n");
}
?>
  <tr>
    <td> </td>
    <td> </td>
  </tr>
  <?php
  for($i = 0; $i < count($equipment); $i++) {
  echo("  <tr>
    <td>".$equipment[$i].":</td>
    <td>".$row[$i + count($information) + count($appearance) + 1 + 1]."</td>
  </tr>\n");
}
?>
  <tr>
    <td> </td>
    <td> </td>
  </tr>
  <?php
  for($i = 0; $i < count($attributes); $i++) {
  echo("  <tr>
    <td>".$attributes[$i].":</td>
    <td>".$row[$i + count($information) + count($appearance) + count($equipment) + 1 + 1]."</td>
  </tr>\n");
}
?>
</table>
</div>
</body>
</html>
<?php exit; } ?>

Link to comment
Share on other sites

Actually, maybe this one too. It looks right though

 

if($_GET['list'] == "madden") { ?>
<?php
include("../include/connect.php");

$categories = array("creator", "name", "age", "college", "team", "position", "jersey_number", "years_pro", "hand", "height", "weight", "skin", "hair_color", "hair_style", "face", "face_shape", "left_tattoo", "right_tattoo", "helmet", "facemask", "visor", "eye_paint", "nasal_strap", "mouth_piece", "neck", "r_elbow", "l_elbow", "r_wrist", "l_wrist", "r_hand", "l_hand", "long_sleeve", "left_knee", "right_knee", "left_ankle", "right_ankle", "shoes", "overall", "strength", "agility", "speed", "accel", "awareness", "catching", "carrying", "throwpower", "throwacc", "kickpower", "kickacc", "tackling", "passblocking", "runblk", "jumping", "kick return", "brktack", "elusiveness", "BC Vision", "stiff arm", "spin", "juke", "impact blocking", "run block strength", "run block footwork", "pass block strength", "pass block footwork", "power moves", "finesse moves", "block shedding", "pursuit", "play recognition", "man coverage", "zone coverage", "spectacular catch", "catch in traffic", "route running", "hit power", "press", "release", "injury", "stamina" , "toughness");

for($j=0; $j<count($_POST); $j++) {
  $values .= "'".$_POST[$j]."',";
}

$values = rtrim($values,",");

for($j=0; $j<count($categories); $j++) {
  $fields .= $categories[$j].",";
}

$fields = rtrim($fields,",");

<?php

$query = "INSERT INTO madden ($fields) VALUES ($values)";
$result = mysql_query($query)or die(mysql_error() . "<p>With Query:<br>$query");

?>

echo("Thanks for adding a CAP into Madden<br />\n<a href=\"../addcaps.php\">Add CAPs</a>");
?>
</body>
</html>
<?php exit; } ?>

 

 

Link to comment
Share on other sites

<?php include("../include/checklogin.php"); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<?php
/*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************Madden**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
if($_GET['list'] == "madden") { ?>
<?php
include("../include/connect.php");

$categories = array("creator", "name", "age", "college", "team", "position", "jersey_number", "years_pro", "hand", "height", "weight", "skin", "hair_color", "hair_style", "face", "face_shape", "left_tattoo", "right_tattoo", "helmet", "facemask", "visor", "eye_paint", "nasal_strap", "mouth_piece", "neck", "r_elbow", "l_elbow", "r_wrist", "l_wrist", "r_hand", "l_hand", "long_sleeve", "left_knee", "right_knee", "left_ankle", "right_ankle", "shoes", "overall", "strength", "agility", "speed", "accel", "awareness", "catching", "carrying", "throwpower", "throwacc", "kickpower", "kickacc", "tackling", "passblocking", "runblk", "jumping", "kick return", "brktack", "elusiveness", "BC Vision", "stiff arm", "spin", "juke", "impact blocking", "run block strength", "run block footwork", "pass block strength", "pass block footwork", "power moves", "finesse moves", "block shedding", "pursuit", "play recognition", "man coverage", "zone coverage", "spectacular catch", "catch in traffic", "route running", "hit power", "press", "release", "injury", "stamina" , "toughness");

for($j=0; $j<count($_POST); $j++) {
  $values .= "'".$_POST[$j]."',";
}

$values = rtrim($values,",");

for($j=0; $j<count($categories); $j++) {
  $fields .= $categories[$j].",";
}

$fields = rtrim($fields,",");

<?php

$query = "INSERT INTO madden ($fields) VALUES ($values)";
$result = mysql_query($query)or die(mysql_error() . "<p>With Query:<br>$query");

?>

echo("Thanks for adding a CAP into Madden<br />\n<a href=\"../addcaps.php\">Add CAPs</a>");
?>
</body>
</html>
<?php exit; } ?>




<?php
/*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************MLB2K7***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
if($_GET['list'] == "mlb2k7") { ?>
<?php
include("../include/connect.php");

$categories = array("creator", "height", "name", "uniform", "age", "potential", "durability", "weight", "bats", "throws", "position", "jersey_fit", "jersey_sleeves", "pant_fit", "paint_style", "undershirt_collar", "undershirt_sleeves", "undershirt", "glasses", "shades_situation", "shades_type", "shades_color_1", "shades_color_2", "shades_color_3", "eye_black", "arm_sleeve", "arm_sleeve_color", "wrist_tape", "wrist_tape_color", "wristband", "wristband_color", "width", "number", "forearm_band", "forearm_band_color", "elbow_band", "elbow_band_color", "sock_style", "shoes", "shoes_color_1", "shoes_color_2", "shoes_color_3", "earrings", "bat_color", "size", "tape", "tape_color", "pine_tar", "helmet_style", "helmet_pine_tar", "hat_under_helmet", "glove", "glove_color_1", "glove_color_2", "glove_color_3", "wrist_brace", "wrist_brace_color", "elbow_guard", "elbow_guard_color", "shin_guard", "shin_guard_color_1", "shin_guard_color_2", "shin_guard_color_3", "mitt_style", "mitt_hand_style", "mitt_glove_style", "mitt_color_1", "mitt_color_2", "mitt_color_3", "pocket_style", "pocket_color_1", "pocket_color_2", "catcher_mask", "mask_color_1", "mask_color_2", "mask_color_3", "vest_color_1", "vest_color_2", "vest_color_3", "catcher_leg_guard", "catcher_leg_guard_color_1", "catcher_leg_guard_color_2", "catcher_leg_guard_color_3", "face", "sig_style", "stance", "stance_height", "chest", "arms", "stomach", "butt", "thighs", "calf", "avg", "avg_lhp", "avg_rhp", "power", "power_lhp", "power_rhp", "doubles", "doubles_lhp", "doubles_rhp", "triples", "triples_lhp", "triples_rhp", "hr", "hr_lhp", "hr_rhp", "clutch", "plate_discipline", "bb", "k", "speed", "acc", "stealing", "aggressiveness", "attentiveness", "bunt", "bunt_for_hit", "range", "anticipation", "arm_strength", "accuracy", "jump_dive", "glove_fielding", "catcher", "1b", "2b", "3b", "ss", "lf", "cf", "rf", "block_plate", "block_pitch", "call_game", "stamina", "ks", "walks_allowed", "avg_against", "avg_lhb", "avg_rhb", "doubles_against", "doubles_lhb", "doubles_rhb", "hr_against", "hr_lhb", "hr_rhb", "pickoff", "composure", "1st_pitch", "1st_pitch_speed", "1st_pitch_control", "1st_pitch_movement", "2nd_pitch", "2nd_pitch_speed", "2nd_pitch_control", "2nd_pitch_movement", "3rd_pitch", "3rd_pitch_speed", "3rd_pitch_control", "3rd_pitch_movement", "4th_pitch", "4th_pitch_speed", "4th_pitch_control", "4th_pitch_movement", "overall");

for($j=0; $j<count($_POST); $j++) {
  $values .= "'".$_POST[$j]."',";
}

$values = rtrim($values,",");

for($j=0; $j<count($categories); $j++) {
  $fields .= $categories[$j].",";
}

$fields = rtrim($fields,",");

mysql_query("INSERT INTO mlb_2k7 ($fields) VALUES($values)")
or die(mysql_error());

echo("Thanks for adding a CAP into MLB 2K7<br />\n<a href=\"../addcaps.php\">Add CAPs</a>");
?>
</body>
</html>
<?php exit; } ?>





<?php
/*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************MLBTheShow*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
if($_GET['list'] == "mlb_theshow") { ?>
<?php
include("../include/connect.php");

$categories = array("creator", "first_name", "last_name", "commentary_name", "age", "skin_tone", "jersey_number", "pri_position", "sec_position", "throw_hand", "bat_hand", "height", "weight", "body_type", "neck_size", "head_shape", "hair_style", "hair_color", "sideburns", "eye_color", "eyebrow_shape", "eyebrow_color", "blemishes", "forehead_wrinkles", "crows_feet", "eyebags", "cleft_chin", "smile_lines", "rosy_cheeks", "lip_color", "skin_complection", "amount", "facial_hair_1", "style1", "length1", "color1", "facial_hair_2", "style2", "length2", "color2", "facial_hair_3", "style3", "length3", "color3", "facial_hair_4", "style4", "length4", "color4", "facial_hair_5", "style5", "length5", "color5", "facial_hair_6", "style6", "length6", "color6", "bat_color", "glove_color", "wrist_band", "forearm_band", "batting_glove", "long_sleeves", "elbow_guard", "shin_guard", "socks", "catcher_mask", "batting_stance", "pitching style" , "walkup_music", "pitch_type_1", "pitch_type_2", "pitch_type_3", "pitch_type_4", "pitch_type_5", "stamina", "pitching_clutch", "h_9", "hr_9", "k_9", "bb_k", "pitch1_speed", "pitch1_control", "pitch1_break", "pitch2_speed", "pitch2_control", "pitch2_break", "pitch3_speed", "pitch3_control", "pitch3_break", "pitch4_speed", "pitch4_control", "pitch4_break", "pitch5_speed", "pitch5_control", "pitch5_break", "rt_contact", "lt_contact", "power_rt", "power_lt", "bunting_ability", "drag_bunt", "plate_vision", "plate_disc", "clutch", "durability", "speed", "arm_strength", "arm_accuracy", "reaction", "fld_ability", "blocking", "br_ability", "br_agg");

for($j=0; $j<count($_POST); $j++) {
  $values .= "'".$_POST[$j]."',";
}

$values = rtrim($values,",");

for($j=0; $j<count($categories); $j++) {
  $fields .= $categories[$j].",";
}

$fields = rtrim($fields,",");

mysql_query("INSERT INTO mlb_theshow ($fields) VALUES($values)")
or die(mysql_error());

echo("Thanks for adding a CAP into MLB The Show<br />\n<a href=\"../addcaps.php\">Add CAPs</a>");
?>
</body>
</html>
<?php exit; } ?>





<?php
/*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************MVP**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
if($_GET['list'] == "mvp") { ?>
<?php
include("../include/connect.php");

$categories = array("creator", "name", "birthdate", "first_position", "second_position", "throws", "bats", "career_potential", "batter_ditty_type", "jersey_number", "height", "weight", "body_type", "face", "hair_color", "hair_style", "facial_hair", "bat_color", "fielding_glove", "elbow_guard", "shin_guard", "wristband", "socks", "catcher_mask", "batting_gloves", "batting_stance", "contact_rhp", "contact_lhp", "power_rhp", "power_lhp", "bunting", "plate_discipline", "durability", "speed", "stealing_tendancy", "baserunning_ability", "fielding", "range", "throwing_strength", "throwing_accuracy", "fastball_take_lhp", "fastball_take_rhp", "fastball_miss_lhp", "fastball_miss_rhp", "fastball_chase_lhp", "fastball_chase_rhp", "curveball_take_lhp", "curveball_take_rhp", "curveball_miss_lhp", "curveball_miss_rhp", "curveball_chase_lhp", "curveball_chase_rhp", "slider_take_lhp", "slider_take_rhp", "slider_miss_lhp", "slider_miss_rhp", "slider_chase_lhp", "slider_chase_rhp", "zones_lhp", "zones_rhp", "pitcher_delivery", "stamina", "pickoff", "fastball_control", "fastball_velocity", "pitch_2", "pitch_2_movement", "pitch_2_trajectory", "pitch_2_control", "pitch_2_velocity", "pitch_3", "pitch_3_movement", "pitch_3_trajectory", "pitch_3_control", "pitch_3_velocity", "pitch_4", "pitch_4_movement", "pitch_4_trajectory", "pitch_4_control", "pitch_4_velocity", "pitch_5", "pitch_5_movement", "pitch_5_trajectory", "pitch_5_control", "pitch_5_velocity");

for($j=0; $j<count($_POST); $j++) {
  $values .= "'".$_POST[$j]."',";
}

$values = rtrim($values,",");

for($j=0; $j<count($categories); $j++) {
  $fields .= $categories[$j].",";
}

$fields = rtrim($fields,",");

mysql_query("INSERT INTO mvp ($fields) VALUES($values)")
or die(mysql_error());

echo("Thanks for adding a CAP into MVP<br />\n<a href=\"../addcaps.php\">Add CAPs</a>");
?>
</body>
</html>
<?php exit; } ?>





<?php
/*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************NBA2K************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
if($_GET['list'] == "nba2k") { ?>
<?php
include("../include/connect.php");

$categories = array("creator", "first_name", "last_name", "position", "jersey_number", "height", "college", "best_hand", "appearance_type", "face", "muscle_tone", "build", "hair_style", "hair_color", "bear_style", "moustache", "sideburns", "shoot_close", "shoot_med", "shoot_3", "free_throw", "layups", "dunking", "ballhandling", "passing", "low_post_def", "low_post_off", "blocking", "stealing", "off_reb", "def_reb", "speed", "stamina", "durability", "off_awareness", "def_awareness");

for($j=0; $j<count($_POST); $j++) {
  $values .= "'".$_POST[$j]."',";
}

$values = rtrim($values,",");

for($j=0; $j<count($categories); $j++) {
  $fields .= $categories[$j].",";
}

$fields = rtrim($fields,",");

mysql_query("INSERT INTO nba_2k ($fields) VALUES($values)")
or die(mysql_error());

echo("Thanks for adding a CAP into NBA 2K<br />\n<a href=\"../addcaps.php\">Add CAPs</a>");
?>
</body>
</html>
<?php exit; } ?>





<?php
/*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************NBALive****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
if($_GET['list'] == "nbalive") { ?>
<?php
include("../include/connect.php");

$categories = array("creator", "template", "cheek_size", "cheek_style", "ear_height", "ear_width", "ear_style", "chin_position", "chin_protrusion", "chin_width", "jaw_position", "jaw_width", "brow_position", "brow_protrusion", "brow_tilt", "brow_thickness", "brow_separation", "brow_style", "brow_color", "eye_position", "eye_tilt", "eye_shape", "eye_separation", "eye_color", "mouth_position", "mouth_protrusion", "mouth_width", "mouth_style", "upper_lip_shape", "upper_lip_thickness", "lower_lip_shape", "lower_lip_thickness", "neck_thickness", "nose_position", "nose_protrusion", "nose_width", "nose_shape", "tip_position", "tip_protrusion", "tip_width", "tip_shape", "nose_style", "facial_hair_style", "facial_hair_color", "hair_style", "hair_color", "forehead_style", "hairskin_age", "body_type", "muscle_definition", "height", "weight", "shades", "headband", "logo", "left_neck_tattoo", "right_neck_tattoo", "left_bicep_accessory", "left_bicep_tattoo", "right_bicep_accessory", "right_bicep_tattoo", "left_elbow_accessory", "right_elbow_accessory", "left_forearm_band", "left_forearm_tattoo", "right_forearm_band", "right_forearm_tattoo", "left_wrist_accessory", "right_wrist_accessory", "left_fingerstrap", "right_fingerstrap", "compression_shorts", "shorts_length", "left_knee_accessory", "right_knee_accessory", "left_calf_accessory", "left_calf_tattoo", "right_calf_accessory", "right_calf_tattoo", "sock_style", "shoes_away", "shoes_home", "first_name", "last_name", "birth_year", "birth_month", "birthday", "birth_city", "birth_state", "primary_position", "secondary_position", "hand", "team", "jersey_number", "years_pro", "school", "field_goals", "three_pointers", "free_throws", "dunking", "inside_scoring", "off_rebounds", "jumping", "strength", "quickness", "speed", "passing", "dribbling", "off_awareness", "def_rebounds", "stealing", "blocking", "def_awareness", "stamina", "hardiness", "highflyer", "scorer_ins", "scorer_out", "playmaker", "power", "shooter", "stopper_ins", "stopper_out");

for($j=0; $j<count($_POST); $j++) {
  $values .= "'".$_POST[$j]."',";
}

$values = rtrim($values,",");

for($j=0; $j<count($categories); $j++) {
  $fields .= $categories[$j].",";
}

$fields = rtrim($fields,",");

mysql_query("INSERT INTO nba_live ($fields) VALUES($values)")
or die(mysql_error());

echo("Thanks for adding a CAP into NBA Live<br />\n<a href=\"../addcaps.php\">Add CAPs</a>");
?>
</body>
</html>
<?php exit; } ?>





<?php
/*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************NCAAFootball***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
if($_GET['list'] == "ncaa_football") { ?>
<?php
include("../include/connect.php");

$categories = array("creator", "first_name", "last_name", "home_state", "hometown", "team", "position", "number", "year", "hand", "height", "weight", "skin", "hair_color", "hair_style", "face", "face_shape", "body_size", "muscles", "helmet", "facemask", "face_protector", "visor", "eye_paint", "nasal_strap", "mouthpiece", "neck_pad", "qb_jacket", "right_elbow", "left_elbow", "turf_tape", "long_sleeves", "sleeve_type", "right_wrist", "left_wrist", "right_hand", "left_hand", "right_ankle", "left_ankle", "overall", "speed", "strength", "awareness", "agility", "acceleration", "catching", "carrying", "jumping", "break_tackle", "tackle", "throw_power", "throw_accuracy", "pass_blocking", "run_blocking", "kick_power", "kick_accuracy", "stamina", "injury");

for($j=0; $j<count($_POST); $j++) {
  $values .= "'".$_POST[$j]."',";
}

$values = rtrim($values,",");

for($j=0; $j<count($categories); $j++) {
  $fields .= $categories[$j].",";
}

$fields = rtrim($fields,",");

mysql_query("INSERT INTO ncaa_football ($fields) VALUES($values)")
or die(mysql_error());

echo("Thanks for adding a CAP into NCAA Football<br />\n<a href=\"../addcaps.php\">Add CAPs</a>");
?>
</body>
</html>
<?php exit; } ?>






<?php
/*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************NHL********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
if($_GET['list'] == "nhl") { ?>
<?php
include("../include/connect.php");

$categories = array("creator", "first_name", "last_name", "position", "jersey_number", "handedness", "birth_year", "birth_month", "birth_day", "city", "origin", "height", "weight", "year_drafted", "team_assigned", "player_type", "player_salary", "contract_type", "fighter", "speed", "checking", "endurance", "puck_control", "passing", "slap_shot_power", "slap_shot_accuracy", "wrist_shot_power", "wrist_shot_accuracy", "agility", "toughness", "acceleration", "balance", "intensity", "potential", "faceoffs", "injury_resist", "penalty_resist", "deking", "aggressiveness", "overall");

for($j=0; $j<count($_POST); $j++) {
  $values .= "'".$_POST[$j]."',";
}

$values = rtrim($values,",");

for($j=0; $j<count($categories); $j++) {
  $fields .= $categories[$j].",";
}

$fields = rtrim($fields,",");

mysql_query("INSERT INTO nhl ($fields) VALUES($values)")
or die(mysql_error());

echo("Thanks for adding a CAP into NHL<br />\n<a href=\"../addcaps.php\">Add CAPs</a>");
?>
</body>
</html>
<?php exit; } ?>





<?php
/*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************NHL2K******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
if($_GET['list'] == "nhl2k") { ?>
<?php
include("../include/connect.php");

$categories = array("creator", "name", "team", "height", "jersey_number", "age", "weight", "country", "hand", "position", "enforcer", "head_type", "facial_hair_color", "hair_style", "hair_color", "scale", "helmet", "visor_type", "visor_color", "gloves", "stick", "skates", "acc", "agg", "agi", "bal", "chb", "chk", "daw", "dur", "end", "fao", "grt", "hnd", "hus", "lea", "nrv", "oaw", "pab", "pas", "pkh", "sac", "shb", "shp", "shq", "bkh", "otm", "poi", "spd", "grb", "slp", "snp", "stp", "com", "tgh", "wrs", "wft", "overall");

for($j=0; $j<count($_POST); $j++) {
  $values .= "'".$_POST[$j]."',";
}

$values = rtrim($values,",");

for($j=0; $j<count($categories); $j++) {
  $fields .= $categories[$j].",";
}

$fields = rtrim($fields,",");

mysql_query("INSERT INTO nhl_2k ($fields) VALUES($values)")
or die(mysql_error());

echo("Thanks for adding a CAP into NHL 2K<br />\n<a href=\"../addcaps.php\">Add CAPs</a>");
?>
</body>
</html>
<?php exit; } ?>
</body>
</html>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.