Probleme PHP enregistrement des données saisi

Fermé
sephirothmana Messages postés 16 Date d'inscription lundi 12 juin 2006 Statut Membre Dernière intervention 10 janvier 2007 - 14 juin 2006 à 15:03
P@ Messages postés 1709 Date d'inscription vendredi 7 juillet 2000 Statut Membre Dernière intervention 24 mars 2009 - 15 juin 2006 à 11:01
Bonjour je suis de retour pour une nouvelle question
Mon formulaire fonctionne mais je ne sais pas comment enregistrer les valeurs saisies dans ma base de données
Si kk& pouvai m'aider ce serait gentil merci la table ou les données seront enregistrer s'apelle publi_publicationstempo
Voila le code de mon formulaire
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<form action="ConfirmationSaisie.php" method="POST">
<head>
  <title>Fomulaire de saisie des publications</title>


</head>
<style type="text/css">
<!--
.auteur {width:150px;}
-->
</style>
<body>
<?php
define("SERVEUR","localhost");
define("LOGIN","root");
define("MDP","");
define("MABASE","dbleom");
//connexion au serveur de BD MySql
$connexion=mysql_connect(SERVEUR,LOGIN,MDP);
//connexion a la base de donnée
mysql_select_db(MABASE,$connexion);
// execution des requetes
$i=1;
$j=1;
$req1 = "SELECT publi_equipelibelle FROM publi_equipe";
$req22 = "SELECT publi_revuenom FROM publi_revue";
$query1 = mysql_query($req1);
$query22 = mysql_query($req22);
?>
<small><big><big><span style="font-weight: bold;"><br>

</span></big></big></small>
<table style="text-align: left; width: 957px; height: 33px;" border="1" cellpadding="2" cellspacing="2">

  <tbody>

    <tr>

      <td>L&eacute;gende :<br>

           
          <span style="font-weight: bold;">Champs obligatoires :</span> <img style="width: 44px; height: 18px;" alt="obligatoire" src="image/fleche_rouge.gif">
           
          <span style="font-style: italic;">Champs facultatifs</span></td>

    </tr>

  </tbody>
</table>

<big><big><span style="font-weight: bold;"><small>
 
           
      </small></span><span style="font-weight: bold;"><small>  </small></span></big></big><br>

<small><img style="width: 44px; height: 19px;" alt="obligatoire" src="image/fleche_rouge.gif"> </small><big><big><span style="font-weight: bold;"><small>Code
unit&eacute;          
   </small></span></big></big><big><big><span style="font-weight: bold;"><small><textarea readonly="readonly" cols="6" rows="1" name="codeuni"></textarea></small></span></big></big>
           
  <big><big><span style="font-weight: bold;"><small>  
  </small></span><small><span style="font-style: italic;">Code &eacute;quipe
: </span></small><span style="font-weight: bold;"><small>
<select name="choixequipe">
<?php
while($val=mysql_fetch_array($query1))
{
echo "<option>".$val["publi_equipelibelle"]. "</option>n";
}
?>
</select>
   </small></span></big></big><br>

<br>

           
       
           
       
           
       
           
       
           
       
           
       
           
       
           
           
 <input value="Ajouter" name="ajouter" type="button"><br>

<small><img style="width: 44px; height: 19px;" alt="obligatoire" src="image/fleche_rouge.gif"> <big><big><big><span style="font-weight: bold;"><small>Type
principal :          
     
           
        </small></span><small><span style="font-style: italic;">Type Secondaire:<br>

<br>

         Type libre
:        </span></small></big></big></big></small><small><big><big><big><small><span style="font-style: italic;"><textarea cols="10" rows="1" name="TypeLibre"></textarea></span></small></big></big></big></small><small><big><big><big><small><span style="font-style: italic;">     
           
 Identifiant dans
la base d'origine:   <textarea cols="9" rows="1" name="IDDB"></textarea><br>

<br>

</span></small></big></big></big></small><small><img style="width: 44px; height: 19px;" alt="obligatoire" src="image/fleche_rouge.gif"></small><small><big><big><big><small><span style="font-style: italic;"> </span><span style="font-weight: bold;">Statut :</span><span style="font-style: italic;">    
   </span></small></big></big></big></small>
<select size="1" name="Statut">
<option>non publi&eacute; (NPU)</option>
<option>publi&eacute; (PUB)</option>
<option>&agrave; paraitre (APA)</option>
</select>

<small><big><big><big><small><span style="font-style: italic;">  </span></small></big></big></big></small> 
     <br>

<br>

            <span style="font-style: italic;">Affiliation :  
          <textarea cols="10" rows="1" name="Affiliation"></textarea>
 <br>

<br>

</span><small> <img title="obligatoire" style="width: 44px; height: 19px;" alt="obligatoire" src="image/fleche_rouge.gif"> <big><big><span style="font-weight: bold;">Liste format&eacute;e
d'auteurs :   (Capacit&eacute; de 20 auteurs)</span></big></big></small><big><big><span style="font-weight: bold;"></span><big><big><span style="font-weight: bold;"></span></big></big></big></big>
<table style="text-align: left; width: 1003px; height: 152px;" border="1" cellpadding="2" cellspacing="2">

  <caption style="caption-side: bottom;"></caption><tbody>

    <tr>

      <td style="white-space: nowrap;"> 
           
   1er auteur    
       2e auteur
            3e
auteur          4e auteur
     
     5e auteur  
           6e
auteur          
  7e  auteur      
    8e auteur
        9e
auteur          
 10e auteur        
  11e auteur      
     12e auteur  
   13e auteur  
        14e auteur  
         15e auteur
            16e
auteur           
17e auteur          18e
auteur          
 19e auteur        
   20e auteur<br>
Nom :      
<?php


while($i<=20)
{
$req2 = "SELECT publi_auteurnom FROM publi_auteur";
$query2 = mysql_query($req2);	
$req3 = "SELECT publi_auteurinitial FROM publi_auteur";
$query3 = mysql_query($req3);
echo"<select name='auteur.$i' class='auteur'>";	
	if ($i==1)
	{
		echo"<option select>Saisie obligatoire</option>";
	}
	else
	{
		echo"<option select></option>";
	}
	while(($val=mysql_fetch_array($query2)) and ($val2 = mysql_fetch_array($query3)))
	{
	echo "<option>".$val["publi_auteurnom"].".".$val2["publi_auteurinitial"]. "</option>n";
	}
	echo"</select>";
	$i++;
}
?>

<br>
      </td>

    </tr>

  </tbody>
</table>

<small><big><br>

<br>

<big><span style="font-weight: bold;"></span></big></big></small><small><img style="width: 44px; height: 19px;" alt="obligatoire" src="image/fleche_rouge.gif"></small><small><big><big><span style="font-weight: bold;">Titre : <textarea cols="70" rows="1" name="Titre"></textarea><br>

<br>

<br>

</span></big></big></small><small><img style="width: 44px; height: 19px;" alt="obligatoire" src="image/fleche_rouge.gif"> <big><big><span style="font-weight: bold;">Ann&eacute;e de publication :
<textarea cols="6" rows="1" name="Anpubli"></textarea></span></big></big></small><small><big><big><span style="font-weight: bold;"><br>

<br>

<br>

</span></big></big></small>
<table style="text-align: left; width: 422px; height: 152px;" border="1" cellpadding="2" cellspacing="2">

  <tbody>

    <tr>

      <td style="white-space: nowrap;"><big><big><span style="font-style: italic;"><small><span style="font-style: italic;"><big><span style="font-style: italic;"><span style="font-style: italic;"><small>Section / sous
section :</small></span></span></big></span></small></span></big></big>
(3 couples maxi)<br>

&ordm;     <textarea cols="15" rows="1" name="section1"></textarea>   /  
 <textarea cols="15" rows="1" name="soussection1"></textarea><br>

&ordm;     <textarea cols="15" rows="1" name="section2"></textarea>   /  
 <textarea cols="15" rows="1" name="soussection2"></textarea><br>

&ordm;     <textarea cols="15" rows="1" name="section3"></textarea>   /  
 <textarea cols="15" rows="1" name="soussection3"></textarea></td>

    </tr>

  </tbody>
</table>

<small><big><big><span style="font-weight: bold;"><br>

</span></big><big style="font-style: italic;"><big><span style="font-weight: bold;"></span></big></big></big></small>
<table style="text-align: left; width: 326px; height: 93px;" border="1" cellpadding="2" cellspacing="2">

  <tbody>

    <tr>

      <td nowrap="nowrap"><big style="font-style: italic;">Choix langue</big><br>

    <input name="langue1" value="" type="radio"> <img style="width: 45px; height: 30px;" alt="Anglais" src="image/uk_dp.gif">
  
 <input name="langue2" value="" type="radio"> <img style="width: 50px; height: 31px;" alt="Espagnol" src="image/Espagne.jpg">     <input name="langue3" value="" type="radio"> <img style="width: 49px; height: 32px;" alt="Italien" src="image/it_dp.gif"><br>

    <input name="langue4" value="" type="radio"> <img style="width: 50px; height: 32px;" alt="Fran&ccedil;ais" src="image/france_dp.gif">    <input name="langue5" value="" type="radio"> <img style="width: 49px; height: 32px;" alt="Allemand" src="image/allemagne_dp.gif">    </td>

    </tr>

  </tbody>
</table>

<small><small><big><big><span style="font-weight: bold;"><br>

</span></big></big></small><big><big><small><span style="font-style: italic;"><big><span style="font-style: italic;"><span style="font-style: italic;">Classification libre<small><small><small>
<big>:   </big></small></small></small></span></span></big></span></small><span style="font-weight: bold;"><textarea cols="15" rows="1" name="classifcationlibre"></textarea>
         
  </span><span style="font-style: italic;">URL
d'acc&egrave;s au document :</span><span style="font-weight: bold;">  <textarea cols="15" rows="1" name="URL"></textarea>  <br>

           
       
           
       
           
       
        </span><span style="font-style: italic;"> Contrat / programme
associ&eacute; : </span></big></big></small><small><big><big><span style="font-style: italic;"><textarea cols="15" rows="1" name="contrat"></textarea></span></big></big></small><small><big><big><span style="font-style: italic;"><br>

<span style="font-style: italic;"> <img style="width: 46px; height: 20px;" alt="obligatoire" src="image/fleche_rouge.gif"> Collation
format&eacute;e :   </span></span></big></big></small><small><big><big><span style="font-style: italic;"><span style="font-style: italic;"><textarea cols="7" rows="1" name="colform"></textarea></span></span></big></big></small><small><big><big><span style="font-style: italic;"><span style="font-style: italic;">    </span></span></big></big></small><small><big><big><span style="font-style: italic;"><span style="font-style: italic;"></span></span></big></big></small><small><big><big><span style="font-style: italic;"><span style="font-style: italic;"><input value="aide" name="collation" type="button"> 
  
  Z</span></span></big></big></small><isindex prompt=""><small><big><big><span style="font-style: italic;"><span style="font-style: italic;">one compl&eacute;ment libre : </span></span></big></big></small><small><big><big><span style="font-style: italic;"><span style="font-style: italic;"><textarea cols="15" rows="1" name="zonecomplibre"></textarea></span></span></big></big></small><small><big><big><span style="font-style: italic;"><span style="font-style: italic;"> <br>

</span><br>

<br>

</span></big></big></small><small><big><big><span style="font-style: italic;"></span></big></big></small><br>

<table style="text-align: left; width: 768px; height: 72px;" border="1" cellpadding="2" cellspacing="2">

  <tbody>

    <tr>

      <td nowrap="nowrap">Champs sp&eacute;cifiques
aux articles de revues<br>

      <br>

      <small><img style="width: 44px; height: 19px;" alt="obligatoire" src="image/fleche_rouge.gif"> <big style="font-weight: bold;"><big>Titre revue
  </big></big></small><small><big style="font-weight: bold;"><big>
   <select name="choixrevue">
<?php
while($val=mysql_fetch_array($query22))
{
echo "<option>".$val["publi_revuenom"]. "</option>";
}
?>
</select>

      </big></big></small><small><big style="font-weight: bold;"><big>  </big></big><input value="Nouvelle revue" name="nouvelle revue" type="submit"><br>

      </td>

    </tr>

  </tbody>
</table>

<br>

           
       
           
       
           
       
           
       
           
       
           
       
           
     
<table align="center" border="5" cellpadding="0" cellspacing="0">

  <tbody>

    <tr>

      <td>

      <input value='Valider la saisie' type='submit'>
	
      </td>

   </tr>

  </tbody>
</table>

<br>
?>
<small><big><big><span style="font-style: italic;"></span></big></big></small>
</body>
</form>
</html>

Merci de bien vouloir m'aider je debute et c tres dur
A voir également:

3 réponses

P@ Messages postés 1709 Date d'inscription vendredi 7 juillet 2000 Statut Membre Dernière intervention 24 mars 2009 185
15 juin 2006 à 10:01
t'as quoi dans ConfirmationSaisie.php ??

0
sephirothmana Messages postés 16 Date d'inscription lundi 12 juin 2006 Statut Membre Dernière intervention 10 janvier 2007
15 juin 2006 à 10:39
ya rien dans ConfirmationSaisie.php juste le code de 3 frame
0
P@ Messages postés 1709 Date d'inscription vendredi 7 juillet 2000 Statut Membre Dernière intervention 24 mars 2009 185
15 juin 2006 à 11:01
bon, tu peux y mettre un script pour contrôler la cohérences des données reçue dans un premier temps.
ensuite ...
tu fait une requête du type
$marequete = mysql_query("INSERT INTO publi_publicationstempo (tu liste le nom de tes champ) VALUES '".$valeur1."', '".$valeur2."', '".$ect."' ");

a adapter biensur :D
au fait tu es sur une base mysql ??
0