viewing the code in a pdf file is very difficult. instead of pasting the code into a pdf file, please compress the original php file into a zip archive and attach the zip file.
the error you report:
Duplicate entry '0' for key 'PRIMARY'.
indicates that the primary key colummn for your table, Membre_id, is not set to be an auto increment column in the database.
you will need to edit the table and set the primary key column to auto increment.