title: update an I'd to previous unique_id record if inserted record value is like previous unique field value
body: <p>Hope this  my question get answered!
  I have a database that contains record of  musicians : musicfile; artistname; albumcover etc. Each entry is entered throug a form but unlike the musician region and music genre that is using html form select option, the artistname is form text input</p>
  
  <p>Input type="text" name="artistname"</p>
  
  <p>So to get artist id am sending an auto increment  hidden field value for every new insert.</p>
  
  <p>My questrion is this: if auto increment value is generated for every  new entry. With artistname, musicfile etc, how I can make  artist_id which is generated by the hidden auto increment to have the same value if the artistname inserted is like the previous artistname inserted without generate an auto increment again for entry with the same artistname  </p>