title: Steps in implementing hashtable in PHP and Mysql
body: <p>I am new to programming language and I am using PHP and mysql. I got an assignment to do a hashtables in php. What I need to do is, store items that a user collected and then display it. After do some research over the internet, I will do the following steps when implement the hashtable, please correct me if I am wrong:</p>
  
  <ol>
  <li><p>Set up the tables:</p>
  
  <p>-> Users Table: uid(int[5]), username(varchar[128]), item_id(int[8], items_id_hash(int[50])</p>
  
  <p>-> Items Table: item_id(int[5]), item_name(varchar[128]), items_id_hash(int[50])</p></li>
  <li><p>Create a hash function (how to create a hash function? Create by myself or get from internet?) to convert a key into a hash value and then insert into database. E.g.: hash item_id = 001 into hash value = (e.g) 12345. Then insert into users table.</p></li>
  <li><p>To display/search. Retrieve the hash values from the user and then compare it to the items table and display it.</p></li>
  </ol>
  
  <p>Questions:</p>
  
  <ol>
  <li>Are my steps correct?</li>
  <li>Where can I find a good php hash function? Can i use md5 or sha1 or salt?</li>
  </ol>