par
etudiantgsi » 07 juin 2010, 22:55
Bah, je sais que sa fait 2 fois que je poste mais en fait la j'ai plus d'erreur la page s'affiche mais juste la dernière partie (le textarea+le pied de page )
donc je pense que c'est un erreur qui est du a l'ordre d'"éfféctuation" de mes rêquetes donc voila si vous pouviez m'aider.
<?php
session_start();
if(@$_POST['button']=="Retour à l'accueil")
{
header("Location:AccueilInternaute.html");
}
else
{
$db=mysql_connect("localhost","root","root") or die("erreur de connexion".mysql_error());
mysql_select_db("projet",$db) or die("erreur de connexion à la base Projet");
$Login=$_SESSION['Logarithme'];
$sql0="SELECT NumInscrit FROM Inscrit Where Login ='$Login' ";
$result0=mysql_query($sql0);
While($ligne0=mysql_fetch_array($result0))
{
$numeroinscrit=$ligne0['NumInscrit'];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >
<head>
<title>Acceuil ConstU - Site de vulgarisation scientifique</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" media="screen" type="text/css" title="Design" href="design.css" />
<style>
<!--
a{text-decoration:none}
//-->
</style>
</head>
<body><form action="transfert_commentaire_inventeur.php" method="POST">
<!-- L'en-tête -->
<!-- Les menus -->
<?php
$Nominv=$_POST['Nominvent'];
$sql="SELECT* FROM Invention Where NomInvention ='$Nominv' ";
$result=mysql_query($sql);
While($ligne=mysql_fetch_array($result))
{
?>
<div id="corps">
<h1><?php echo $ligne['NomInvention'];?></h1>
<p class="alinea">
<table>
<tr>
<td>Née le :</td>
<td> <?php echo $ligne['DateInv']; ?></td>
</tr>
<tr>
<td>Mort le :</td>
<td> <?php echo $ligne['RefInventeur']; ?></td>
</tr>
</table>
</p>
<h2>Partie 1</h2>
<p class="alinea">
<?php echo $ligne['RefInventeur']; ?>
</p>
<br>
<?php
$numinventeur=$ligne['NumInvention'];
$sql2="SELECT* FROM CommentaireInvention Where ComInvention ='$numinventeur' ";
$result2=mysql_query($sql2);
While($ligne2=mysql_fetch_array($result2))
{
?>
<table>
<tr>
<td><h3>Commentaires De <?php echo $ligne2['ComInventeurIns']; ?> :</h3></td>
</tr>
<tr><td><?php echo $ligne2['CommentaireIeur']; ?><?php }}} }mysql_close(); ?></td>
</tr>
<input type="hidden" name="numinscrit" value="<?php echo $numeroinscrit; ?>" />
<tr><td><textarea type="test" name="commentaire" rows="3" cols="25"></textarea></td>
</tr>
<input type="hidden" name="numinventeur" value="<?php echo NumInvention ; ?>" />
<tr><td><input type="submit" value="confirmer" />
<input type="submit" name="button" value="Retour à l'accueil" />
<input type="reset" value="Réinitialiser" /></td></tr>
<!-- Le pied de page -->
<tr><td> <div id="pied_de_page">
<p>Tous droits réservés © 2010 ConstU</p>
</div></td></table>
</form>
</body>
</html>
Bah, je sais que sa fait 2 fois que je poste mais en fait la j'ai plus d'erreur la page s'affiche mais juste la dernière partie (le textarea+le pied de page )
donc je pense que c'est un erreur qui est du a l'ordre d'"éfféctuation" de mes rêquetes donc voila si vous pouviez m'aider.
[php]<?php
session_start();
if(@$_POST['button']=="Retour à l'accueil")
{
header("Location:AccueilInternaute.html");
}
else
{
$db=mysql_connect("localhost","root","root") or die("erreur de connexion".mysql_error());
mysql_select_db("projet",$db) or die("erreur de connexion à la base Projet");
$Login=$_SESSION['Logarithme'];
$sql0="SELECT NumInscrit FROM Inscrit Where Login ='$Login' ";
$result0=mysql_query($sql0);
While($ligne0=mysql_fetch_array($result0))
{
$numeroinscrit=$ligne0['NumInscrit'];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >
<head>
<title>Acceuil ConstU - Site de vulgarisation scientifique</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" media="screen" type="text/css" title="Design" href="design.css" />
<style>
<!--
a{text-decoration:none}
//-->
</style>
</head>
<body><form action="transfert_commentaire_inventeur.php" method="POST">
<!-- L'en-tête -->
<!-- Les menus -->
<?php
$Nominv=$_POST['Nominvent'];
$sql="SELECT* FROM Invention Where NomInvention ='$Nominv' ";
$result=mysql_query($sql);
While($ligne=mysql_fetch_array($result))
{
?>
<div id="corps">
<h1><?php echo $ligne['NomInvention'];?></h1>
<p class="alinea">
<table>
<tr>
<td>Née le :</td>
<td> <?php echo $ligne['DateInv']; ?></td>
</tr>
<tr>
<td>Mort le :</td>
<td> <?php echo $ligne['RefInventeur']; ?></td>
</tr>
</table>
</p>
<h2>Partie 1</h2>
<p class="alinea">
<?php echo $ligne['RefInventeur']; ?>
</p>
<br>
<?php
$numinventeur=$ligne['NumInvention'];
$sql2="SELECT* FROM CommentaireInvention Where ComInvention ='$numinventeur' ";
$result2=mysql_query($sql2);
While($ligne2=mysql_fetch_array($result2))
{
?>
<table>
<tr>
<td><h3>Commentaires De <?php echo $ligne2['ComInventeurIns']; ?> :</h3></td>
</tr>
<tr><td><?php echo $ligne2['CommentaireIeur']; ?><?php }}} }mysql_close(); ?></td>
</tr>
<input type="hidden" name="numinscrit" value="<?php echo $numeroinscrit; ?>" />
<tr><td><textarea type="test" name="commentaire" rows="3" cols="25"></textarea></td>
</tr>
<input type="hidden" name="numinventeur" value="<?php echo NumInvention ; ?>" />
<tr><td><input type="submit" value="confirmer" />
<input type="submit" name="button" value="Retour à l'accueil" />
<input type="reset" value="Réinitialiser" /></td></tr>
<!-- Le pied de page -->
<tr><td> <div id="pied_de_page">
<p>Tous droits réservés © 2010 ConstU</p>
</div></td></table>
</form>
</body>
</html>
[/php]