par Sebe » 23 janv. 2006, 14:25
par Truc » 23 janv. 2006, 01:53
par Sebe » 23 janv. 2006, 01:37
par Sebe » 22 janv. 2006, 15:29
par Truc » 22 janv. 2006, 14:49
par Cyrano » 22 janv. 2006, 12:32
par Sebe » 22 janv. 2006, 12:28
Sebe, je salue ici la patience infinie de Truc. Tu ne fais rien pour l'aider dans tes réponses. Dire que tu as un message d'erreur différent du précédent, c'est bien, mais complètement sans intérêt si tu n'affiches pas dans la foulée le nouveau message au complet accompagné des lignes de code indiquées.
Tu en es à 6 pages sur ce sujet et j'ai abandonné depuis un moment. Un problème doit être isolé pour être résolu et si un nouveau problème apparaît, il doit faire l'objet d'un nouveau sujet.
Que tu aies besoin d'un coup de pouce, ça ne pose aucun problème, mais fais un minimum d'effort de ton coté.
par Cyrano » 22 janv. 2006, 11:50
par Sebe » 22 janv. 2006, 11:42
par Truc » 22 janv. 2006, 00:49
il n'y a plus d'erreur si tu racourcis le code, en nlevant ?><?php qui se suivent ?
<?php require_once('../Connections/kainbuye.php'); ?> <?php function GetSQLValueString...
par Sebe » 22 janv. 2006, 00:29
EasyPHP 1.7 active une buffarisation de sortie. C'est à dire qu'elle conserve toute sortie vers le client jusqu'à concurence d'une certaine taille. Or, cela a pour effet qu'aucun texte n'est envoyé vers le client et ce, même si vous faites un echo ou insérer du code HTML. En utilisant header, aucune erreur ne sera générée à cause de cette option. Cependant, cette possiblité est à utiliser avec précaution car ce n'est pas tous les serveurs qui activent la buffarisation de sortie.
par Truc » 21 janv. 2006, 23:59
Et je ne vois pas vers quoi tu veux m'envoyer (FAQ) ... je ne comprend pas pourquoi il me met ce message d'erreur!
(...)je vais donc alléger mon code sur toutes mes pages!
par Sebe » 21 janv. 2006, 22:41
inutile de mettre tout ce code ! et une image pour l'erreur...
Le message aurait suffit Ce message correspond au Header de la ligne 49 ! Il y a ce qu'il faut dans la FAQ pour comprendre alors je ne m'attarde pas.
enlève cette "jointure" de balises php: <?php require_once('../Connections/kainbuye.php'); ?> <?php function GetSQLValueString...
par Truc » 20 janv. 2006, 22:41
<?php require_once('../Connections/kainbuye.php'); function GetSQLValueString...
par Sebe » 20 janv. 2006, 21:05
<?php require_once('../Connections/kainbuye.php'); ?> <?php function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue; switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } $editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { $insertSQL = sprintf("INSERT INTO acrho_changement (acrho_club_id_club, acrho_participant_ID_participant, annee, dossard, acrho_categorie_ID_categorie) VALUES (%s, %s, %s, %s, %s)", GetSQLValueString($_POST['club'], "int"), GetSQLValueString($_POST['participant'], "int"), GetSQLValueString($_POST['annee'], "date"), GetSQLValueString($_POST['dossard'], "int"), GetSQLValueString($_POST['categorie'], "int")); mysql_select_db($database_kainbuye, $kainbuye); $Result1 = mysql_query($insertSQL, $kainbuye) or die(mysql_error()); $insertGoTo = "affectation.php?part=" . $row_participant['ID_coureur'] . ""; if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $insertGoTo)); } $colname_participant = "-1"; if (isset($_GET['part'])) { $colname_participant = (get_magic_quotes_gpc()) ? $_GET['part'] : addslashes($_GET['part']); } mysql_select_db($database_kainbuye, $kainbuye); $query_participant = sprintf("SELECT ID_coureur, nom, prenom FROM acrho_participant WHERE ID_coureur = %s", $colname_participant); $participant = mysql_query($query_participant, $kainbuye) or die(mysql_error()); $row_participant = mysql_fetch_assoc($participant); $totalRows_participant = mysql_num_rows($participant); mysql_select_db($database_kainbuye, $kainbuye); $query_club = "SELECT * FROM acrho_club ORDER BY nom_cub ASC"; $club = mysql_query($query_club, $kainbuye) or die(mysql_error()); $row_club = mysql_fetch_assoc($club); $totalRows_club = mysql_num_rows($club); mysql_select_db($database_kainbuye, $kainbuye); $query_categorie = "SELECT id_categorie, nom_categorie, sexe FROM acrho_categorie ORDER BY age_min ASC"; $categorie = mysql_query($query_categorie, $kainbuye) or die(mysql_error()); $row_categorie = mysql_fetch_assoc($categorie); $totalRows_categorie = mysql_num_rows($categorie); mysql_select_db($database_kainbuye, $kainbuye); $query_chang = "SELECT * FROM acrho_changement"; $chang = mysql_query($query_chang, $kainbuye) or die(mysql_error()); $row_chang = mysql_fetch_assoc($chang); $totalRows_chang = mysql_num_rows($chang); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Nouvelle affectation</title> </head> <body> <table width="565" border="0" cellpadding="0" cellspacing="0" class="cosmic18"> <!--DWLayoutTable--> <tr> <td width="40" height="23"> </td> <td width="475"> </td> <td width="50"> </td> </tr> <tr> <td height="26" colspan="3" valign="top"><div align="center">Ajouter l'affectation à <strong><?php echo $row_participant['prenom']; ?> <?php echo $row_participant['nom']; ?></strong></div></td> </tr> <tr> <td height="25"> </td> <td> </td> <td> </td> </tr> <tr> <td height="35"> </td> <td valign="top"><form id="form1" name="form1" method="POST" action="<?php echo $editFormAction; ?>"> <table width="100%" border="1"> <tr> <td>Année</td> <td><label> <select name="annee" id="annee"> <option value="1983">1983</option> <option value="1984">1984</option> <option value="1985">1985</option> <option value="1986">1986</option> <option value="1987">1987</option> <option value="1988">1988</option> <option value="1989">1989</option> <option value="1990">1990</option> <option value="1991">1991</option> <option value="1992">1992</option> <option value="1993">1993</option> <option value="1994">1994</option> <option value="1995">1995</option> <option value="1996">1996</option> <option value="1997">1997</option> <option value="1998">1998</option> <option value="1999">1999</option> <option value="2000">2000</option> <option value="2001">2001</option> <option value="2002">2002</option> <option value="2003">2003</option> <option value="2004">2004</option> <option value="2005">2005</option> <option value="2006">2006</option> <option value="2007">2007</option> <option value="2008">2008</option> <option value="2009">2009</option> <option value="2010">2010</option> </select> <input name="participant" type="hidden" id="participant" value="<?php echo $row_participant['ID_coureur']; ?>" /> </label></td> </tr> <tr> <td>Dossard</td> <td><label> <input name="dossard" type="text" id="dossard" size="5" maxlength="5" /> </label></td> </tr> <tr> <td>Club</td> <td><label> <select name="club" id="club"> <?php do { ?><option value="<?php echo $row_club['id_club']?>"<?php if (!(strcmp($row_club['id_club'], $row_chang['acrho_club_id_club']))) {echo "selected=\"selected\"";} ?>><?php echo $row_club['nom_cub']?></option> <?php } while ($row_club = mysql_fetch_assoc($club)); $rows = mysql_num_rows($club); if($rows > 0) { mysql_data_seek($club, 0); $row_club = mysql_fetch_assoc($club); } ?> </select> </label></td> </tr> <tr> <td>Catégorie</td> <td><label> <select name="categorie" id="categorie"> <?php do { ?><option value="<?php echo $row_categorie['id_categorie']?>"<?php if (!(strcmp($row_categorie['id_categorie'], $row_chang['acrho_categorie_ID_categorie']))) {echo "selected=\"selected\"";} ?>><?php echo $row_categorie['nom_categorie']?></option> <?php } while ($row_categorie = mysql_fetch_assoc($categorie)); $rows = mysql_num_rows($categorie); if($rows > 0) { mysql_data_seek($categorie, 0); $row_categorie = mysql_fetch_assoc($categorie); } ?> </select> </label></td> </tr> <tr> <td> </td> <td><label> <input type="submit" name="Submit" value="Ajouter l'affectation" /> </label></td> </tr> </table> <input type="hidden" name="MM_insert" value="form1"> </form> </td> <td> </td> </tr> <tr> <td height="299"> </td> <td> </td> <td> </td> </tr> </table> </body> </html><?php mysql_free_result($participant); mysql_free_result($club); mysql_free_result($categorie); mysql_free_result($chang); ?>