x0s
Messages postés12Date d'inscriptionmardi 27 avril 2004StatutMembreDernière intervention 5 juin 2004
-
29 mai 2004 à 12:01
x0s
Messages postés12Date d'inscriptionmardi 27 avril 2004StatutMembreDernière intervention 5 juin 2004
-
29 mai 2004 à 12:11
bonjour j'ai une erreur dans mon script, il m'indique:
"Parse error: parse error, unexpected T_IF in w:\design\easyphp\www\bac-fr\admin\modif_fiche.php on line 8"
la ligne 8 correspond au premier If
<?
include('../connec.php');
include('fonctions.php');
$result = mysql_query("SELECT * FROM fiches where id='$id'") or die ('Erreur : '.mysql_error() );
$row = mysql_fetch_array($result)
if ((isset($valid)) && ($valid == "OK")) {
if (empty($_POST['genre']) or empty($_POST['type'])) {
echo 'Erreur: un champs non rempli';
include('Modif_fiche.php');
} else {
$genre = $_POST['genre'];
$type = $_POST['type'];
$fiche = $_POST['fiche'];
$req = mysql_query('SELECT * FROM fiches');
$fiche2 = nl2br($fiche);
$roq = "Update `fiches` Set genre='$genre', type'$type' where id='$id'";
mysql_query($roq);
$fd = fopen("../fiches/".$auteur."/".$oeuvre."/".$type.".php","w");
fwrite($fd, "$fiche2\n");
fclose($fd);
include('modif_fiche.php');
}
}
?>