Il y a deja un role avec ce nom

\n"; break; } $r = pg_query("SELECT MAX(idrole) FROM role"); $a = pg_fetch_array($r); if($a !== false) $newid = $a[0]+1; else $newid = 0; $r = pg_query("INSERT INTO role(idrole, name) VALUES($newid, '".$_GET['name']."')"); } } while(false); $r = pg_query("SELECT idrole, name FROM role"); if($a = pg_fetch_array($r)) { ?> \n"; $a = pg_fetch_array($r); } echo "
idnom
".$a['idrole']."".$a['name']."
\n"; } ?>