login  Naam:   Wachtwoord: 
Registreer je!
 Forum

session_start error

Offline Klikoo - 19/01/2007 19:16 (laatste wijziging 19/01/2007 19:53)
Avatar van KlikooNieuw lid Ik wilde een gastenboek invoegen in mijn site met css, maar nu krijg ik telkens een error.. Kijk maar op: http://www.de-atjes.nl/gastenboek/guestbook.php

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  2. "http://www.w3.org/TR/html4/loose.dtd">
  3. <html>
  4. <head><link href="../style.css" rel="stylesheet" type="text/css" />
  5. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  6. <title>De Atjes.nl!</title>
  7. </head>
  8.  
  9. <body>
  10. <div class="Container">
  11. <div class="Grolsch_Logo"></div>
  12. <div class="Tussenstukje"></div>
  13. <div class="Bovenkant_Menu"></div>
  14. <div class="Eind"></div>
  15. <div class="Home"><a href="../index.html"><img src="images/andere-layout-totaal_05.png" border="0"></a></div>
  16. <div class="De_atjes"><a href="../de_atjes.html"><img src="images/andere-layout-totaal_06.png" border="0"></a></div>
  17. <div class="Gastenboek"><a href="guestbook.php"><img src="images/andere-layout-totaal_07.png" border="0"></a></div>
  18. <div class="Fotos"><a href="../fotos.html"><img src="images/andere-layout-totaal_08.png" border="0"></a></div>
  19. <div class="Lege_plek"></div>
  20. <div class="Foto"></div>
  21. <div class="Bovenkant_Content"></div>
  22. <div class="Content">
  23. <div class="Tekstvak">
  24. <?php
  25. include ("functions/functions_db.php");
  26. include ("config/settings.php");
  27. include ("includes/header.php");
  28.  
  29. // START CHECK IF INSTALL.PHP EXISTS
  30. if (file_exists("install/install.php"))
  31. {
  32. ?>
  33. <tr>
  34. <td class="emptyspace"><?php echo $lang["installfileexists"]; ?></td>
  35. </tr>
  36. <?php
  37. }
  38. else
  39. {
  40. // END CHECK IF INSTALL.PHP EXISTS
  41.  
  42. // START BAN CHECK
  43. $ip = $_SERVER["HTTP_X_FORWARDED_FOR"];
  44. if($ip == "")
  45. $ip = $_SERVER["REMOTE_ADDR"];
  46.  
  47. $checkBan = dbQuery("SELECT ip FROM ".$tableprefix."bans WHERE ip = '$ip'") or die("<p><b>Database Error:</b></p><p>".mysql_error()."</p>");
  48. $isBanned = mysql_num_rows($checkBan);
  49.  
  50. if ($isBanned)
  51. {
  52. ?>
  53. <tr>
  54. <td class="emptyspace"><?php echo $lang["ban_message"]; ?></td>
  55. </tr>
  56. <?php
  57. }
  58. else
  59. {
  60. // END BAN CHECK
  61.  
  62. if ($_GET["action"] == "write")
  63. {
  64. include ("functions/functions_gb.php");
  65. if ($_POST["submit"])
  66. {
  67. $gbUsername = dbSafeInput($_POST["gbUsername"]);
  68. $gbEmail = dbSafeInput($_POST["gbEmail"]);
  69. $gbWebsite = dbSafeInput($_POST["gbWebsite"]);
  70. $gbSubject = dbSafeInput($_POST["gbSubject"]);
  71. $gbMessage = dbSafeInput($_POST["gbMessage"]);
  72. $imgcode = $_POST["imgcode"];
  73.  
  74. writeForm2($gbUsername, $gbEmail, $gbWebsite, $gbSubject, $gbMessage, $imgcode);
  75. }
  76. else
  77. {
  78. if ($_SESSION[$sessionprefix . "logged_in"])
  79. {
  80. $getAdminQuery = dbQuery("SELECT * FROM ".$tableprefix."admin") or die("<p><b>Database Error:</b></p><p>".mysql_error()."</p>");
  81. $getAdminArray = mysql_fetch_array($getAdminQuery);
  82.  
  83. writeForm($getAdminArray["username"], $getAdminArray["email"], $getAdminArray["website"], '', '');
  84. }
  85. else
  86. {
  87. writeForm('', '', 'http://', '', '');
  88. }
  89. }
  90. }
  91. elseif ($_GET["action"] == "mailuser")
  92. {
  93. include ("functions/functions_gb.php");
  94. if ($_POST["submit"])
  95. {
  96. $mailuser_subject = dbSafeInput($_POST["mailuser_subject"]);
  97. $mailuser_message = dbSafeInput($_POST["mailuser_message"]);
  98. $mailuser_email_sender = dbSafeInput($_POST["mailuser_email_sender"]);
  99. $imgcode = $_POST["imgcode"];
  100. mailuserForm2($mailuser_subject, $mailuser_message, $mailuser_email_sender, $imgcode);
  101. }
  102. else
  103. {
  104. mailuserForm('', '', '');
  105. }
  106. }
  107. elseif ($_GET["action"] == "forgotpassword")
  108. {
  109. include ("functions/functions_gb.php");
  110. if ($_POST["submit"])
  111. {
  112. $lostpasswordemail = dbSafeInput($_POST["lostpasswordemail"]);
  113. forgotPasswordForm2($lostpasswordemail);
  114. }
  115. else
  116. {
  117. forgotPasswordForm('');
  118. }
  119. }
  120. elseif ($_GET["action"] == "login")
  121. {
  122. include ("functions/functions_cpanel.php");
  123. if ($_POST["submit"])
  124. {
  125. $admin_username = dbSafeInput($_POST["admin_username"]);
  126. $admin_password = dbSafeInput($_POST["admin_password"]);
  127.  
  128. loginForm2($admin_username, $admin_password);
  129. }
  130. else
  131. {
  132. loginForm('', '');
  133. }
  134. }
  135. elseif ($_GET["action"] == "logout")
  136. {
  137. include ("functions/functions_cpanel.php");
  138. logoutForm();
  139. }
  140. elseif ($_GET["action"] == "cpanel")
  141. {
  142. include ("functions/functions_cpanel.php");
  143. show_cpanel();
  144. }
  145. else
  146. {
  147. include ("functions/functions_gb.php");
  148. ?>
  149. <form action="<?php echo $_SERVER["PHP_SELF"]; ?>?action=cpanel&action2=delmessage" method="post" name="delform">
  150. <?php
  151. gbEntries();
  152. ?>
  153. </form>
  154. <?php
  155. }
  156. // START BAN CHECK
  157. }
  158. // END BAN CHECK
  159.  
  160. // START CHECK IF INSTALL.PHP EXISTS
  161. }
  162. // END CHECK IF INSTALL.PHP EXISTS
  163. include ("includes/footer.php");
  164. ?>
  165. </div>
  166. </div>
  167. <div class="Onderkant_Content"></div>
  168. <div class="Poll"></div>
  169. <div class="Overig"></div>
  170. </div>
  171.  
  172. </body>
  173. </html>

3 antwoorden

Gesponsorde links
Offline Stijn - 19/01/2007 19:44
Avatar van Stijn PHP expert zet volgende code boven <html> tag
  1. <?php
  2. ?>
Offline Kr4nKz1n - 19/01/2007 19:46
Avatar van Kr4nKz1n Onbekend Misschien tijd om [code][/code] te gebruiken?
Of om op plaatscode.be te zetten (beter).
Offline Klikoo - 19/01/2007 19:53
Avatar van Klikoo Nieuw lid Ok tnx!! Hij doet et 
Gesponsorde links
Dit onderwerp is gesloten.
Actieve forumberichten
© 2002-2024 Sitemasters.be - Regels - Laadtijd: 0.212s