par
Invité » 30 mars 2005, 15:18
<html>
<head>
<title></title>
</head>
<body>
<br>
<h2 align=center> MODIFIER UNE FICHE </H2>
<BR>
<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?> ">
<?
include("sql.inc");
mysql_connect($nom_hote, $nom_utilisateur,$password);
$base=mysql_select_db("adresse");
if(!$base)
{
echo"impossible d’ouvrir la base";
}
echo"<table border=0 align=center width=330 CELLSPACING=0>
<tr><td width=50%>
<p>Quelle fiche ?</td>
<td width=126>";
echo"<form name=\"form1\>";
echo"<p><select name=ligne size=\"1\">";
echo"<p><select name=ligne size=\"1\">";
$table=mysql_query("SELECT*FROM donnée");
while($ligne=mysql_fetch_object($table))
{
echo"<option value=\"$ligne->user\" > $ligne->user </option>";
}
echo"</select>";
echo"</form1>";
echo"</td>
</tr>
<tr><td width=135 height=27>
<p>Quelle donnée ?</td><td width=126 height=27>";
echo"<form name=\"form2\>";
echo"<p><select name=ligne1 size=\"1\">";
echo"<p><select name=ligne1 size=\"1\">";
$table=mysql_query("SELECT*FROM nom");
while($ligne1=mysql_fetch_object($table))
{
echo"<option value=\"$ligne1->nom\"> $ligne1->nom </option>";
}
echo"</select>";
echo"</form2>";
$valeur=mysql_query("SELECT $ligne1 FROM donnée WHERE user=$ligne");
echo"</td>";
echo"<td width=135 align=center>";
echo"<input type=submit value=OUI></td></tr>";
echo"<tr><td width=135>
<p>Ancienne valeur :</td>";
echo"<td width=126>
<input type=text name=ancienne value='$valeur'></td>
</tr>
<tr>
<td width=135>
<p>Nouvelle valeur :</td>
<td width=126>
<p><input type=text name=nouvelle ></td>
</tr>";
?>
</form><form method="post" action="page5_2.php">
<?
echo"<tr>
<td width=135 align=center>
<p><br></b><input type=submit name=modifier value=Modifier></td>
<td width=126 align=center>
<p><br></b><input type=reset name=annuler value=Annuler></td>
</tr>
</table><br>";
echo"<br>";
$lien1="./page2.php";
$text1="accueil";
$lien2="./index.php";
$text2="sortir";
echo"<table width=100%>";
echo"<tr>";
echo"<td width=25% align=left></td>";
echo"<td width=50% align=center>";
echo"<b><a href=\" $lien1\">$text1</a> <br /></b>";
echo"</td>";
echo"<td width=25% align=right>";
echo"<b><a href=\" $lien2\">$text2</a> <br /></b>";
echo"</td></tr></table>";
?>
</form>
</body>
</html>
<html>
<head>
<title></title>
</head>
<body>
<br>
<h2 align=center> MODIFIER UNE FICHE </H2>
<BR>
<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?> ">
<?
include("sql.inc");
mysql_connect($nom_hote, $nom_utilisateur,$password);
$base=mysql_select_db("adresse");
if(!$base)
{
echo"impossible d’ouvrir la base";
}
echo"<table border=0 align=center width=330 CELLSPACING=0>
<tr><td width=50%>
<p>Quelle fiche ?</td>
<td width=126>";
echo"<form name=\"form1\>";
echo"<p><select name=ligne size=\"1\">";
echo"<p><select name=ligne size=\"1\">";
$table=mysql_query("SELECT*FROM donnée");
while($ligne=mysql_fetch_object($table))
{
echo"<option value=\"$ligne->user\" > $ligne->user </option>";
}
echo"</select>";
echo"</form1>";
echo"</td>
</tr>
<tr><td width=135 height=27>
<p>Quelle donnée ?</td><td width=126 height=27>";
echo"<form name=\"form2\>";
echo"<p><select name=ligne1 size=\"1\">";
echo"<p><select name=ligne1 size=\"1\">";
$table=mysql_query("SELECT*FROM nom");
while($ligne1=mysql_fetch_object($table))
{
echo"<option value=\"$ligne1->nom\"> $ligne1->nom </option>";
}
echo"</select>";
echo"</form2>";
$valeur=mysql_query("SELECT $ligne1 FROM donnée WHERE user=$ligne");
echo"</td>";
echo"<td width=135 align=center>";
echo"<input type=submit value=OUI></td></tr>";
echo"<tr><td width=135>
<p>Ancienne valeur :</td>";
echo"<td width=126>
<input type=text name=ancienne value='$valeur'></td>
</tr>
<tr>
<td width=135>
<p>Nouvelle valeur :</td>
<td width=126>
<p><input type=text name=nouvelle ></td>
</tr>";
?>
</form><form method="post" action="page5_2.php">
<?
echo"<tr>
<td width=135 align=center>
<p><br></b><input type=submit name=modifier value=Modifier></td>
<td width=126 align=center>
<p><br></b><input type=reset name=annuler value=Annuler></td>
</tr>
</table><br>";
echo"<br>";
$lien1="./page2.php";
$text1="accueil";
$lien2="./index.php";
$text2="sortir";
echo"<table width=100%>";
echo"<tr>";
echo"<td width=25% align=left></td>";
echo"<td width=50% align=center>";
echo"<b><a href=\" $lien1\">$text1</a> <br /></b>";
echo"</td>";
echo"<td width=25% align=right>";
echo"<b><a href=\" $lien2\">$text2</a> <br /></b>";
echo"</td></tr></table>";
?>
</form>
</body>
</html>