login  Naam:   Wachtwoord: 
Registreer je!
 Forum

Poll

Offline Frederic - 06/11/2004 22:58
Avatar van FredericPHP ver gevorderde Iedere keer als ik in mijn poll script heb gestemd, krijg ik:
Citaat:
Warning: Cannot modify header information - headers already sent by (output started at /usr/local/psa/home/vhosts/..../httpdocs/Test/Poll/poll.php:74) in /usr/local/psa/home/vhosts/..../httpdocs/Test/Poll/poll.php on line 75


Mijn script is:
  1. <?php
  2. require("config.inc.php");
  3. require("functies.fnc.php");
  4.  
  5. $sql = "SELECT * FROM `".$poll_tabel."` WHERE `einde`>=".$time_stamp." ORDER BY `begin` DESC LIMIT 1";
  6. $result = mysql_query($sql);
  7. $aantal = mysql_num_rows($result);
  8.  
  9. if(!isset($_POST['gardp']))
  10. {
  11. if($aantal < 1)
  12. {echo "<center><p class=\"normaal\"><center>".$poll_txt[11]."</p></center>";}
  13.  
  14. elseif($aantal > 0)
  15. {
  16. $array = mysql_fetch_array($result);
  17. $id = $array['id'];
  18.  
  19. if($_GET['actie'] == "")
  20. {
  21. if(!isset($_POST['doe_poll']))
  22. {
  23. if(check_gestemd($id, stem_ip()))
  24. {
  25. results($id);
  26.  
  27. $N_cOkIe = "new_vot_poll_".$id;
  28. $J_cOkIe = "vot_poll_".$id;
  29.  
  30. if(isset($_COOKIE[$N_cOkIe]))
  31. {
  32. echo "<br /><p class=\"normaal\"><center>".$poll_txt[15]."</p></center>";
  33. setcookie($N_cOkIe, false);
  34. setcookie($J_cOkIe, true);
  35. }
  36. else
  37. {echo "<br /><p class=\"normaal\"><center>".$poll_txt[12]."</p></center>";}
  38. }
  39.  
  40. elseif(!check_gestemd($id, stem_ip()))
  41. {
  42. $vraag = $array['vraag'];
  43. $antwoorden = $array['antwoorden'];
  44.  
  45. poll_venter($pi['poll_W'], $id, $vraag, $antwoorden, 'ja');
  46.  
  47. if($pi['st_resl'] == "true")
  48. {echo "<center><p class=\"normaal\"><a href='?actie=result'>".$poll_txt[16]."</p></a></center>";}
  49. }
  50. }
  51.  
  52. elseif(isset($_POST['doe_poll']))
  53. {
  54. if(check_gestemd($id, stem_ip()))
  55. {echo "<p class=\"normaal\">".$poll_txt[14]."</p>";}
  56.  
  57. elseif(!check_gestemd($id, stem_ip()))
  58. {
  59. $poll_id = $_POST['poll_id'];
  60. $stem = $_POST['stem'];
  61. $ip = stem_ip();
  62.  
  63. $insert = "INSERT INTO `".$stem_tabel."` (`id`, `ip`, `poll_id`, `antwoord`) VALUES ('', '".$ip."', '".$poll_id."', '".$stem."')";
  64. mysql_query($insert);
  65.  
  66. $cookieN = "new_vot_poll_".$poll_id;
  67. $cookie1 = "poll_".$poll_id;
  68. $cookie2 = $poll_id."_llop";
  69.  
  70. setcookie($cookieN, true);
  71. setcookie($cookie1, true);
  72. setcookie($cookie2, true);
  73.  
  74. echo "<p class=\"normaal\">".$poll_txt[15]."</p>";
  75. header("Location: ".$_SERVER['REQUEST_URI']);
  76. }
  77. }
  78. }
  79.  
  80. if($_GET['actie'] == 'result')
  81. {results($id);}
  82. }
  83. }
  84.  
  85. if($pi['show_vpz'] == "true")
  86. {show_don_polls();}
  87. ?>
  88. <style type="text/css" media="all">@import "Stijl.css";</style>
(komt van deze site)

En als ik de resultaten wil bekijken:
Citaat:
Warning: Cannot modify header information - headers already sent by (output started at /usr/local/psa/home/vhosts/fadetolife.be/httpdocs/Test/Poll/functies.fnc.php:309) in /usr/local/psa/home/vhosts/fadetolife.be/httpdocs/Test/Poll/poll.php on line 33

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/psa/home/vhosts/.../httpdocs/Test/Poll/functies.fnc.php:309) in /usr/local/psa/home/vhosts/..../httpdocs/Test/Poll/poll.php on line 34

Kan iemand me helpen?:?: Pleas?

0 antwoorden

Gesponsorde links
Er zijn nog geen reacties op dit bericht.
Dit onderwerp is gesloten.
Actieve forumberichten
© 2002-2024 Sitemasters.be - Regels - Laadtijd: 0.193s