Re Anthomicro,
C'est gentil de prendre le temps parce que là je suis sur le rebords...
Le "sujet" est super important, c'est ce qui va donner envie d'aller voir ou non :-)
Voici mon code, merci beaucoup !
Ma BDD s'appelle 'blark'
#
# Structure de la table `application`
#
CREATE TABLE application (
id_application int(8) NOT NULL auto_increment,
name_application varchar(255) NOT NULL default '',
type_application tinyint(1) NOT NULL default '0',
PRIMARY KEY (id_application)
) TYPE=MyISAM;
#
# Contenu de la table `application`
#
INSERT INTO application VALUES (9, 'Summarization', 0);
INSERT INTO application VALUES (3, 'Classification', 0);
INSERT INTO application VALUES (4, 'Indexing', 0);
INSERT INTO application VALUES (6, 'Dictation', 0);
INSERT INTO application VALUES (22, 'Document Production', 0);
Ma page s'appelle application.php
<?
include("_connexion.php");
echo "<form method='post' action='application_add.php'>
Application <input name='application_name' type='text' size='30'><br><br>
<input name='application_type' type='radio' value='0'> Spoken language<br>
<input name='application_type' type='radio' value='1'> Written language<br><br>
<input type='submit' value='Add'>
</form>
<div class='erreur'>";
if($_GET['erreur'] == 1) {
echo "<br>Error : you didn't enter the application's name !<br><br>";
}
elseif($_GET['erreur'] == 2) {
echo "<br>Error : you didn't select the application's type !<br><br>";
}
echo "</div><br>";
$request=mysql_query("SELECT * FROM application ORDER BY id_application ASC",$link);
$total=mysql_num_rows($request);
if ($total > 0) {
echo "<table width='0' cellpadding='0' cellspacing='1' border='0'>";
while($table=mysql_fetch_array($request,MYSQL_ASSOC)) {
$color = ($i % 2) ? "#ffffff" : "#bbc3d3" ;
$i++ ;
echo "<tr><td width='70' bgcolor=$color class='contents'> ID = $table[id_application]</td>
<td width='190' bgcolor=$color class='contents'> $table[name_application]</td>
<td width='25' align='center' bgcolor=$color class='contents'><b>";
if ($table[type_application] == 0) {
echo "<div title='Spoken language'>SL</div></b></td>";
}
else {
echo "<div title='Written language'>WL</div></b></td>";
}
echo "<td width='25' align='center' bgcolor=$color
class='contents'><a href='#' title='Edit
$table[name_application]'><img src='../images/edit.gif'
border='0'></a></td>
<td width='25' align='center' bgcolor=$color
class='contents'><a
href='application_del.php?id=$table[id_application]' title='Delete
$table[name_application]'><img src=\"../images/delete.gif\"
border=\"0\" onClick=\"return confirm('Are you sure you want to delete
$table[name_application] ?');\"></a></td></tr>";
}
echo "</table>";
}
else {
echo "Il n'y a pas d'enregistrements";
}
?>