1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Test</title>
<?php
///Connexion à la base
$hostname = "localhost";
$database = "magasin";
$username = "root";
$password = "";
$CnxMagasin = mysql_pconnect($hostname, $username, $password) or trigger_error(mysql_error(),E_USER_ERROR);
$id = $_GET['reference'] ; //c'est id reçue de la page liste modifier
mysql_select_db($database, $CnxMagasin);
$query_sql = "SELECT * FROM produit WHERE produit.reference = '$id'";
$sql = mysql_query($query_sql, $CnxMagasin) or die(mysql_error());
$row_sql = mysql_fetch_assoc($sql);
?>
<form action="test.php" method="get">
<td height="24">Reference</td>
<td><input name="reference" type="text" id="reference" size="20" maxlength="30" value="<?php echo $row_sql['reference']; ?>" /></td>
</tr>
<tr>
<td height="24">Designation</td>
<td><input name="designation" type="text" id="designation" size="20" value="<?php echo $row_sql['designation']; ?>" /></td>
</tr>
<tr>
<td height="71">Description</td>
<td><textarea name="description" cols="35" rows="5" class="Style1" id="description" ><?php echo $row_sql['description']; ?></textarea></td>
</tr>
</form>
</body>
</html> |