为什么这个表格不起作用?

时间:2011-05-14 12:16:29

标签: php mysql arrays forms

太长了吗?当我填写并单击提交时,没有任何反应。

<form action="http://www.yeahthatrocks.com/update.php" method="post">
Game Name:  <input name="game_name" type="text" size="25" maxlength="255" /><br></br>
Release Date:  <input name="release_date" type="text" size="25" /><p></p>

<p>Console:
  <select name="game_console">
    <option value="PS3">PS3</option>
    <option value="Xbox 360">Xbox 360</option>
    <option value="Both">Both</option>
  </select>

  Game Category:  
  <select name="game_category">
    <option value="Retail">Retail</option>
    <option value="PSN">PSN</option>
    <option value="Arcade">Arcade</option>
    <option value="Arcade">DLC</option>
  </select>

  Game Type:  
  <select name="game_type">
    <option value="Action">Action</option>
    <option value="Action RPG">Action RPG</option>
    <option value="Adventure">Adventure</option>
    <option value="Board">Board</option>
    <option value="Card">Card</option>
    <option value="Casino">Casino</option>
    <option value="Educational">Educational</option>
    <option value="Fighting">Fighting</option>
    <option value="Flight">Flight</option>
    <option value="Game Show">Game Show</option>
    <option value="Hunting">Hunting</option>
    <option value="Music">Music</option>
    <option value="Other">Other</option>
    <option value="Pinball">Pinball</option>
    <option value="Platformer">Platformer</option>
    <option value="Puzzle">Puzzle</option>
    <option value="Racing">Racing</option>
    <option value="RPG">RPG</option>
    <option value="Shooter">Shooter</option>
    <option value="Sports">Sports</option>
    <option value="Strategy">Strategy</option>
    <option value="Virtual Pet">Virtual Pet</option>
  </select>



 Trophy Totals:</p> 

 Bronze:  <input name="bronze_ttl" type="text" size="3" maxlength="3" />
 <br/>
Silver:  <input name="Silver Total" type="text" size="3" maxlength="3" /><br/>
Gold:  <input name="Gold Total" type="text" size="3" maxlength="3" /><br/>
Platinum:  <input name="Platinum Total" type="text" size="3" maxlength="3" /><br/>
Hidden:  <input name="Hidden Total" type="text" size="3" maxlength="3" /><br/>
Xbox Pts.:  <input name="Xbox Pts Total" type="text" size="5" maxlength="5" /><br/>



</p>
<p>&nbsp;</p>
<p>Trophies:</p>
Trophy Name:    <input name="tr_name[0]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[0]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[0]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[0]" type="text" size="4" maxlength="4" /><p></p>

Trophy Name:    <input name="tr_name[1]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[1]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[1]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[1]" type="text" size="4" maxlength="4" /><p></p>

Trophy Name:    <input name="tr_name[2]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[2]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[2]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[2]" type="text" size="4" maxlength="4" /><p></p>

Trophy Name:    <input name="tr_name[3]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[3]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[3]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[3]" type="text" size="4" maxlength="4" /><p></p>

Trophy Name:    <input name="tr_name[4]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[4]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[4]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[4]" type="text" size="4" maxlength="4" /><p></p>

Trophy Name:    <input name="tr_name[5]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[5]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[5]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[5]" type="text" size="4" maxlength="4" /><p></p>

Trophy Name:    <input name="tr_name[6]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[6]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[6]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[6]" type="text" size="4" maxlength="4" /><p></p>

Trophy Name:    <input name="tr_name[7]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[7]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[7]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[7]" type="text" size="4" maxlength="4" /><p></p>

Trophy Name:    <input name="tr_name[8]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[8]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[8]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[8]" type="text" size="4" maxlength="4" /><p></p>

Trophy Name:    <input name="tr_name[9]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[9]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[9]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[9]" type="text" size="4" maxlength="4" /><p></p>

Trophy Name:    <input name="tr_name[10]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[10]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[10]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[10]" type="text" size="4" maxlength="4" /><p></p>

Trophy Name:    <input name="tr_name[11]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[11]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[11]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[11]" type="text" size="4" maxlength="4" /><p></p>

Trophy Name:    <input name="tr_name[12]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[12]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[12]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[12]" type="text" size="4" maxlength="4" /><p></p>

Trophy Name:    <input name="tr_name[13]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[13]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[13]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[13]" type="text" size="4" maxlength="4" /><p></p>

Trophy Name:    <input name="tr_name[14]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[14]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[14]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[14]" type="text" size="4" maxlength="4" /><p></p>

Trophy Name:    <input name="tr_name[15]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[15]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[15]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[15]" type="text" size="4" maxlength="4" /><p></p>

Trophy Name:    <input name="tr_name[16]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[16]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[16]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[16]" type="text" size="4" maxlength="4" /><p></p>

Trophy Name:    <input name="tr_name[17]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[17]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[17]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[17]" type="text" size="4" maxlength="4" /><p></p>

Trophy Name:    <input name="tr_name[18]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[18]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[18]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[18]" type="text" size="4" maxlength="4" /><p></p>

Trophy Name:    <input name="tr_name[19]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[19]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[19]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[19]" type="text" size="4" maxlength="4" /><p></p>

Trophy Name:    <input name="tr_name[20]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[20]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[20]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[20]" type="text" size="4" maxlength="4" /><p></p>

Trophy Name:    <input name="tr_name[21]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[21]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[21]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[21]" type="text" size="4" maxlength="4" /><p></p>


Trophy Name:    <input name="tr_name[22]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[22]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[22]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[22]" type="text" size="4" maxlength="4" /><p></p>

Trophy Name:    <input name="tr_name[23]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[23]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[23]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[23]" type="text" size="4" maxlength="4" /><p></p>


Trophy Name:    <input name="tr_name[24]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[24]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[24]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[24]" type="text" size="4" maxlength="4" /><p></p>


Trophy Name:    <input name="tr_name[25]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[25]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[25]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[25]" type="text" size="4" maxlength="4" /><p></p>

Trophy Name:    <input name="tr_name[26]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[26]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[26]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[26]" type="text" size="4" maxlength="4" /><p></p>

Trophy Name:    <input name="tr_name[27]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[27]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[27]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[27]" type="text" size="4" maxlength="4" /><p></p>

Trophy Name:    <input name="tr_name[28]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[28]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[28]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[28]" type="text" size="4" maxlength="4" /><p></p>


Trophy Name:    <input name="tr_name[29]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[29]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[29]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[29]" type="text" size="4" maxlength="4" /><p></p>


Trophy Name:    <input name="tr_name[30]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[30]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[30]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[30]" type="text" size="4" maxlength="4" /><p></p>

Trophy Name:    <input name="tr_name[31]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[31]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[31]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[31]" type="text" size="4" maxlength="4" /><p></p>

Trophy Name:    <input name="tr_name[32]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[32]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[32]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[32]" type="text" size="4" maxlength="4" /><p></p>

Trophy Name:    <input name="tr_name[33]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[33]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[33]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[33]" type="text" size="4" maxlength="4" /><p></p>

Trophy Name:    <input name="tr_name[34]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[34]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[34]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[34]" type="text" size="4" maxlength="4" /><p></p>


Trophy Name:    <input name="tr_name[35]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[35]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[35]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[35]" type="text" size="4" maxlength="4" /><p></p>

Trophy Name:    <input name="tr_name[36]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[36]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[36]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[36]" type="text" size="4" maxlength="4" /><p></p>

Trophy Name:    <input name="tr_name[37]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[37]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[37]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[37]" type="text" size="4" maxlength="4" /><p></p>

Trophy Name:    <input name="tr_name[38]" type="text" size="50" maxlength="255" /><br/>
Descripton:     <input name="tr_desc[38]" type="text" size="50" maxlength="255" /><br/>
Trophy Color:   <select name="tr_color[38]">
  <option value="Bronze">Bronze</option>
  <option value="Silver">Silver</option>
  <option value="Gold">Gold</option>
  <option value="Platinum">Platinum</option>
  <option value="Hidden">Hidden</option>
</select>
Points: <input name="tr_ach_value[38]" type="text" size="4" maxlength="4" /><p></p>



<input name="submit" type="button" value="submit" />
</form>

这是动作php。我知道我仍然必须逃离插入物以防止注射。

<?php

ini_set('display_errors',1);
error_reporting(E_ALL); 

$con = mysql_connect("*********","**********","******");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("***********", $con);

$sql="INSERT INTO games (game_name, release_date, game_category, game_type, game_console)
VALUES
('$_POST[game_name]','$_POST[release_date]','$_POST[game_category]','$_POST[game_type]','$_POST[game_console]')";

mysql_query($sql);

$sql2="INSERT INTO trophy_totals (game_name, bronze_ttl, silver_ttl, gold_ttl, plat_ttl, hidden_ttl, total_points)
VALUES
('$_POST[game_name]','$_POST[bronze_ttl]','$_POST[silver_ttl]','$_POST[gold_ttl]','$_POST[plat_ttl]','$_POST[hidden_ttl]','$_POST[total_points]')";

mysql_query($sql2);

    foreach($_POST['tr_name'] as $tr_name) {
        $sql3 = "INSERT INTO trophies (game_name, tr_name, tr_description, tr_color, tr_ach_value) VALUES ('".$_POST['game_name']."', '".$tr_name['tr_name']."', '".$tr_name['tr_desc']."', '".$tr_name['tr_color']."', '".$tr_name['tr_ach_value']."')";
        mysql_query($sql3);
    }
echo "Record added";
echo $sql;

mysql_close($con)


?>

1 个答案:

答案 0 :(得分:4)

将提交按钮更改为type="submit"