Сирожиддин
JAMES_RODRIGUEZ, kodingizda mantiq yo'q, insert intoda WHERE ishlatmang, `id` ni ham o'zi avtomatik oladi.

  1. <?php
  2. define('_IN_JOHNCMS', 1);
  3. $headmod = 'tournament23454';
  4. $textl = 'Кубковые турниры';
  5. require_once ("../incfiles/core.php");
  6. require_once ("../incfiles/head.php");
  7.  
  8. // Новички
  9. if ($id) {
  10. $q = mysql_query("select * from fman_matches where id = '$id'");
  11.  
  12. mysql_query("insert into `r_cupgame`
  13. set
  14. `rez1`='" . $m['sc1'] . "',
  15. `rez2`='" . $m['sc2'] . "',
  16. `pen1`='" . $m['pen1'] . "',
  17. `pen2`='" . $m['pen2'] . "',
  18. `id_report`='" . $m['id'] . "'
  19. ;") or die(mysql_error());
  20.  
  21. header('location: /man/match.php?id='.$id);
  22. }
  23. require_once ("../incfiles/end.php");
  24. ?>