Mysql update if record exist if not create new record


I have been able to get data into a database but now need to update the record if the id exists or create a new record if not, anyone have any suggestions on the best way to do this?

im using phpmyadmin if that helps