Tom's Guide > Forum > Programmation > erreur php

erreur php

Forum Programmation : erreur php

TomsGuide.com : 800 000 inscrits répondent à toutes vos questions high-tech et informatique. Pour obtenir de l'aide, inscrivez-vous gratuitement !
Mot :    Pseudo :           
 

voici le code de ma page internet:

Code :
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
  3. <title>Pure CSS Scrollable Table with Fixed Header</title>
  4. <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
  5. <meta http-equiv="language" content="en-us" />
  6. <script type="text/javascript">
  7. <!--
  8. /* http://www.alistapart.com/articles/zebratables/ */
  9. function removeClassName (elem, className) {
  10.     elem.className = elem.className.replace(className, "" ).trim();
  11. }
  12. function addCSSClass (elem, className) {
  13.     removeClassName (elem, className);
  14.     elem.className = (elem.className + " " + className).trim();
  15. }
  16. String.prototype.trim = function() {
  17.     return this.replace( /^\s+|\s+$/, "" );
  18. }
  19. function stripedTable() {
  20.     if (document.getElementById && document.getElementsByTagName) { 
  21.         var allTables = document.getElementsByTagName('table');
  22.         if (!allTables) { return; }
  23.         for (var i = 0; i < allTables.length; i++) {
  24.             if (allTables[i].className.match(/[\w\s ]*scrollTable[\w\s ]*/)) {
  25.                 var trs = allTables[i].getElementsByTagName("tr" );
  26.                 for (var j = 0; j < trs.length; j++) {
  27.                     removeClassName(trs[j], 'alternateRow');
  28.                     addCSSClass(trs[j], 'normalRow');
  29.                 }
  30.                 for (var k = 0; k < trs.length; k += 2) {
  31.                     removeClassName(trs[k], 'normalRow');
  32.                     addCSSClass(trs[k], 'alternateRow');
  33.                 }
  34.             }
  35.         }
  36.     }
  37. }
  38. window.onload = function() { stripedTable(); }
  39. -->
  40. </script>
  41. <style type="text/css">
  42. /* define height and width of scrollable area. Add 16px to width for scrollbar          */
  43. div.tableContainer {
  44.     clear: both;
  45.     border: 1px solid #963;
  46.     height: 285px;
  47.     overflow: auto;
  48.     width: 756px
  49. }
  50. /* Reset overflow value to hidden for all non-IE browsers. */
  51. html>body div.tableContainer {
  52.     overflow: hidden;
  53.     width: 756px
  54. }
  55. /* define width of table. IE browsers only                */
  56. div.tableContainer table {
  57.     float: left;
  58.     width: 740px
  59. }
  60. /* define width of table. Add 16px to width for scrollbar.          */
  61. /* All other non-IE browsers.                                        */
  62. html>body div.tableContainer table {
  63.     width: 350px
  64. }
  65. /* set table header to a fixed position. WinIE 6.x only                                      */
  66. /* In WinIE 6.x, any element with a position property set to relative and is a child of      */
  67. /* an element that has an overflow property set, the relative value translates into fixed.    */
  68. /* Ex: parent element DIV with a class of tableContainer has an overflow property set to auto */
  69. thead.fixedHeader tr {
  70.     position: relative
  71. }
  72. /* set THEAD element to have block level attributes. All other non-IE browsers            */
  73. /* this enables overflow to work on TBODY element. All other non-IE, non-Mozilla browsers */
  74. html>body thead.fixedHeader tr {
  75.     display: block
  76. }
  77. /* make the TH elements pretty */
  78. thead.fixedHeader th {
  79.     background: blue;
  80.     border-left: 1px solid red;
  81.     border-right: 1px solid red;
  82.     border-top: 1px solid red;
  83.     font-weight: normal;
  84.     padding: 4px 3px;
  85.     text-align: left
  86. }
  87. /* define the table content to be scrollable                                              */
  88. /* set TBODY element to have block level attributes. All other non-IE browsers            */
  89. /* this enables overflow to work on TBODY element. All other non-IE, non-Mozilla browsers */
  90. /* induced side effect is that child TDs no longer accept width: auto                    */
  91. html>body tbody.scrollContent {
  92.     display: block;
  93.     height: 262px;
  94.     overflow: auto;
  95.     width: 100%
  96. }
  97. /* make TD elements pretty. Provide alternating classes for striping the table */
  98. /* http://www.alistapart.com/articles/zebratables/                            */
  99. tbody.scrollContent td, tbody.scrollContent tr.normalRow td {
  100.     background: black;
  101.     border-bottom: none;
  102.     border-left: none;
  103.     border-right: 1px solid #CCC;
  104.     border-top: 1px solid #DDD;
  105.     padding: 2px 3px 3px 4px
  106. }
  107. tbody.scrollContent tr.alternateRow td {
  108.     background: black;
  109.     border-bottom: none;
  110.     border-left: none;
  111.     border-right: 1px solid #CCC;
  112.     border-top: 1px solid #DDD;
  113.     padding: 2px 3px 3px 4px
  114. }
  115. /* define width of TH elements: 1st, 2nd, and 3rd respectively.          */
  116. /* Add 16px to last TH for scrollbar padding. All other non-IE browsers. */
  117. /* http://www.w3.org/TR/REC-CSS2/selector.html#adjacent-selectors        */
  118. html>body thead.fixedHeader th {
  119.     width: 200px
  120. }
  121. html>body thead.fixedHeader th + th {
  122.     width: 240px
  123. }
  124. html>body thead.fixedHeader th + th + th {
  125.     width: 316px
  126. }
  127. /* define width of TD elements: 1st, 2nd, and 3rd respectively.          */
  128. /* All other non-IE browsers.                                            */
  129. /* http://www.w3.org/TR/REC-CSS2/selector.html#adjacent-selectors        */
  130. html>body tbody.scrollContent td {
  131.     width: 200px
  132. }
  133. html>body tbody.scrollContent td + td {
  134.     width: 240px
  135. }
  136. html>body tbody.scrollContent td + td + td {
  137.     width: 300px
  138. }
  139. -->
  140. </style>
  141. <link href="css/style.css" rel="stylesheet" type="text/css" />
  142. </head><body>
  143. <div id="tableContainer" class="tableContainer">
  144. <table border="0" cellpadding="0" cellspacing="0" width="100%" class="scrollTable">
  145. <thead class="fixedHeader">
  146.     <tr>
  147.         <th><center>Votre compte</center></th>
  148.     </tr>
  149. </thead>
  150. <tbody class="scrollContent">
  151.     <tr>
  152.         <td>
  153.         <?php
  154.         session_start();
  155. include('user_verif.php');
  156. user_verif("1", "user_login.php?action=login" );
  157. ?>
  158. <p align="center">
  159. <font face="Arial" size="2">
  160. Vous &ecirc;tes connect&eacute sous: <a href="mailto: <?php user('email'); ?>"><?php user('pseudo'); ?></a> en tant que <b><?php user('rang'); ?></b>
  161. <br>
  162. <br>
  163. Il y a <?php  stats('nb', '123');  ?> membres sur le site.
  164. <br>
  165. </font>
  166. <?php
  167. ?>
  168. <font face="Arial" size="2">
  169. En voici la liste:
  170. <br>
  171. <br>
  172. <?php stats('ls', '123');  ?>
  173. </font>
  174. <br>
  175. <?php
  176. ?>
  177. <font face="Arial" size="2">
  178. Il y a <?php  stats('nb', '3');  ?> administrateurs et <?php  stats('nb', '2');  ?> mod&eacuterateurs sur le site.
  179. <br>
  180. <br>
  181. Les <b>administrateurs</b>:
  182. <br>
  183. <font color="red">
  184. <?php stats('ls', '3');  ?>
  185. </font>
  186. <br>
  187. <br>
  188. Les <b>mod&eacuterateurs</b>:
  189. <br>
  190. <font color="blue">
  191. <?php stats('ls', '2');  ?>
  192. <br>
  193. <br>
  194. <?php $html='<a href="admin/index.php">Administration</a>'; affiche($html, '3'); ?><br>
  195. <?php $html='<a href="user_login.php?action=logout" target="_blank">D&eacuteconnexion</a>'; affiche($html, '123'); ?><br>
  196. <?php $html='<a href="user_update.php?action=modif">Editer votre profil</a>'; affiche($html, '123'); ?>
  197. </font>
  198. </font>
  199. </td>
  200.     </tr>
  201. </tbody>
  202. </table>
  203. </div>
  204. </body></html>



dans mon tableu il y a une erreur que je ne sais pas comment corriger. si vous pourrier maider. avec ma session quand elle est ouverte


Message édité par jonathanbedard22 le 21-06-2007 à 16:43:01
------------------------------ BEDJ
La grande différence entre l’amour et l’amitié, c’est qu’il ne peut y avoir d’amitié sans réciprocité.
Liens sponsorisés
Inscrivez-vous ou connectez-vous pour masquer ceci.

et c'est quoi le message d'erreur?

------------------------------ Ne pas oublier le [resolu] pour finir le sujet.
Penser à voir les tutos, ca peut aider!
Répondre à coca25

Le session_start() doit etre la premiere ligne de ton code.

Code :
  1. <?
  2. session_start();
  3. ?>
  4. //Reste du code

------------------------------ La parole est d'argent mais le silence est d'or
Répondre à DivX_666

@divx_666: :jap: pour avoir lu

------------------------------ Ne pas oublier le [resolu] pour finir le sujet.
Penser à voir les tutos, ca peut aider!
Répondre à coca25

Voici le message dereur que sa me donne:


Code :
  1. Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /www/sites/1/ifrance.com/b/e/bedjbedard/site/mainframe.php:132) in /www/sites/1/ifrance.com/b/e/bedjbedard/site/mainframe.php on line 176


Message édité par jonathanbedard22 le 21-06-2007 à 16:43:55
------------------------------ BEDJ
La grande différence entre l’amour et l’amitié, c’est qu’il ne peut y avoir d’amitié sans réciprocité.
Répondre à jonathanbedard22

Donc en principe c'est bien ce que je me disais. Met le session_start(); au tout debut de ta page comme je l'ai dit avant.

------------------------------ La parole est d'argent mais le silence est d'or
Répondre à DivX_666

je vais essaye de le mettre au debut de mon body si jai bien compris
merci et je vous tein au courant

------------------------------ BEDJ
La grande différence entre l’amour et l’amitié, c’est qu’il ne peut y avoir d’amitié sans réciprocité.
Répondre à jonathanbedard22

ok merci jai reussi. je devais le mettre avant le html

------------------------------ BEDJ
La grande différence entre l’amour et l’amitié, c’est qu’il ne peut y avoir d’amitié sans réciprocité.
Répondre à jonathanbedard22
Tom's Guide > Forum > Programmation > erreur php
Aller à :

Il y a 194 utilisateurs connus et inconnus. Pour voir la liste des connectés connus, cliquez ici.

Attention

Vous allez répondre sur un sujet resté inactif pendant plus de 6 mois.
Assurez-vous d'apporter des éléments nouveaux à la discussion avant de poursuivre.

Répondre Annuler
Liens