bonjour
tu devalides requires_once
et une erreur
Notice: Undefined variable: count in C:\wamp\www\romain\bades\serv_fichesaisie.php on line 73
Fatal error: Function name must be a string in C:\wamp\www\romain\bades\serv_fichesaisie.php on line 73
cette variable n'existe pas pas mais
fait ex
//$count($matiere)
for($u=0;$u < 7;$u++)
tu mets des echo devant tes requetes et tu veras un peu plus clair
<?php
echo '';
print_r($_POST);
session_start();
//require_once('connexion.php');
?>
tu fais un extract qui sert a rien il me semble ...
<?php
mysql_select_db($database_dbprotect, $dbprotect);
if ((isset($_POST['validation'])) && $_POST['validation'] == "valider") {
echo "";
print_r($_POST);
echo "
";
extract($_POST);
//$francais=addslashes($_POST["francais"]);
$notfranc1 = addslashes($_POST["notfranc1"]);
$notfranc2 = addslashes($_POST["notfranc2"]);
$notfranc3 = addslashes($_POST["notfranc3"]);
$notfranc4 = addslashes($_POST["notfranc4"]);
//$math=addslashes($_POST["math"]);
$notmath1 = addslashes($_POST["notmath1"]);
$notmath2 = addslashes($_POST["notmath2"]);
$notmath3 = addslashes($_POST["notmath3"]);
$notmath4 = addslashes($_POST["notmath4"]);
//$anglais=addslashes($_POST["anglais"]);
$notanglais1 = addslashes($_POST["notanglais1"]);
$notanglais2 = addslashes($_POST["notanglais2"]);
$notanglais3 = addslashes($_POST["notanglais3"]);
$notanglais4 = addslashes($_POST["notanglais4"]);
//$scphys=addslashes($_POST["scphys"]);
$notphys1 = addslashes($_POST["notphys1"]);
$notphys2 = addslashes($_POST["notphys2"]);
$notphys3 = addslashes($_POST["notphys3"]);
$notphys4 = addslashes($_POST["notphys4"]);
//$ortho=addslashes($_POST["ortho"]);
$notortho1 = addslashes($_POST["notortho1"]);
$notortho2 = addslashes($_POST["notortho2"]);
$notortho3 = addslashes($_POST["notortho3"]);
$notortho4 = addslashes($_POST["notortho4"]);
//$histgeo=addslashes($_POST["histgeo"]);
$histgeo1 = addslashes($_POST["histgeo1"]);
$histgeo2 = addslashes($_POST["histgeo2"]);
$histgeo3 = addslashes($_POST["histgeo3"]);
$histgeo4 = addslashes($_POST["histgeo4"]);
//$svt=addslashes($_POST["svt"]);
$notsvt1 = addslashes($_POST["notsvt1"]);
$notsvt2 = addslashes($_POST["notsvt2"]);
$notsvt3 = addslashes($_POST["notsvt3"]);
$notsvt4 = addslashes($_POST["notsvt4"]);
$ResultatExamenCand = addslashes($_POST["ResultatExamenCand"]);
$metier = addslashes($_POST["metier"]);
$HandicapCand = addslashes($_POST["HandicapCand"]);
$DoubleSelectCand = addslashes($_POST["DoubleSelectCand"]);
$residenceParentCand = addslashes($_POST["residenceParentCand"]);
$PersoneEnChargeCand = addslashes($_POST["PersoneEnChargeCand"]);
$CelCand = addslashes($_POST["CelCand"]);
$validation = array();
//$count($matiere)
for($u=0;$u < $count($matiere);$u++)
{
$matiere = $matiere[$u];
echo $requete = "INSERT INTO note (trimestre1 , trimestre2, trimestre3,moyenannuel)VALUES ('',";
switch ($matiere) {
case "FRANCAIS":
$parametres = $notfranc1."', '".$notfranc2."', '".$notfranc3."', '".$notfranc4."'";
break;
case "MATHEMATIQUES":
$parametres = $notmath1."', '".$notmath2."', '".$notmath3."', '".$notmath4."'";
break;
case "ANGLAIS":
$parametres = $notanglais1."', '".$notanglais2."', '".$notanglais3."', '".$notanglais4."'";
break;
case "SCIENCES PHYSIQUES":
$parametres = $notphys1."', '".$notphys2."', '".$notphys3."', '".$notphys4."'";
break;
case "ORTHOGRAPHE":
$parametres = $notortho1."', '".$notortho2."', '".$notortho3."', '".$notortho4."'";
break;
case "HISTOIRE GEOGRAPHIE":
$parametres = $histgeo1."', '".$histgeo2."', '".$histgeo3."', '".$histgeo4."'";
break;
case "SVT":
$parametres = $notsvt1."', '".$notsvt2."', '".$notsvt3."', '".$notsvt4."'";
break;
}
echo $tableau[1] = $requete .= $parametres.'")";';
echo $tableau[2] = $requete_info = "INSERT INTO candidat (ResultatExamenCand,metier,Handicap,DoubleSelectCand,residenceParentCand,PersoneEnChargeCand,CelCand )
VALUES (
'',
'$ResultatExamenCand',
'$metier',
'$Handicap',
'$DoubleSelectCand',
'$residenceParentCand',
'$PersoneEnChargeCand',
'$CelCand')";
function validiter_execution($requete_a_executer)
{
return (mysql_query($requete_a_executer)) ? true : false;
}
$statut_execution_requete = "";
for($i=0;$i< count($tableau);$i++)
{
$statut_execution_requete = validiter_execution($tableau[$i]);
}
$validation[$u] = $statut_execution_requete;
}
// if (in_array(false, $validation)) // validation a tester
//
// {
// echo "l'inscription a ŽchouŽe
";
// }
// else
// {
// echo "l'inscription a été effectuée avec succès
";
// }
echo "l'inscription a été effectuée avec succès
";
echo "Nouvelle inscription";
echo "
Consulter la liste";
}
?>
Bonne programmation !