title: Creating foreign key in phpmyadmin mysql
body: <p>Creating a comment system with a simple rating system for each comment.</p>
  
  <p>tables :  1.For the comments and it is called <code>comments</code> and it has three columns : <code>id</code>, <code>name</code>, <code>comment</code>
  2. for the IP of the user that did the rating and it is called <code>voted_ip</code>and it has three columns <code>id</code>, <code>comment_id</code>, <code>user_ip</code></p>
  
  <p>The purpose of the voted_ip table is that i need to save the IP address for each rate to validate it that it cannot rate again if it exists.</p>
  
  <p>I created a foreign key from the child table <code>voted_ip</code> in the column <code>comment_id</code> connecting it to the parent table <code>comments</code> in the column <code>id</code> following the steps at this <a href="http://www.elitetechnologygroup.com/welcome/index.php?view=entry&amp;year=2010&amp;month=02&amp;day=16&amp;id=16:phpmyadmin-relational-tables-wforeign-keys&amp;option=com_lyftenbloggie" rel="noreferrer">link</a> and this <a href="http://www.youtube.com/watch?v=J3xvwhqYYMQ" rel="noreferrer">video</a> on how to create a working foreign key except that the child table still do not update after a comment or a rate is inserted.</p>
  
  <p>as follow : <img src="https://i.stack.imgur.com/jrbEe.jpg" alt="the foreign key creation"></p>
  
  <p>I thought about that there might be another step or I have to do something in the php side of the project. What am I missing?</p>