Facebook have it’s own like system which pretty good. This post will tell you how to create a "Like system" like that of Facebook. All you have to need is jQuery, MySQL Database and PDO PHP extension. This technic is partially used in my social network, Open. See the demo there in the social network. But you have to signup.
<div>
<span style="color: red; font-family: inherit;">The table should be like this:</span>
</div>
How to run/execute SQL Code
Go to localhost/phpmyadmin/server_sql.php.
Paste the SQL Code in the text box shown in the page and press GO button at the bottom right of the page.
If you want to run code in PHP file do as below.
Open your PHP file.
Add these lines in the file.
mysql_query("sql code here");
NOTE – Replace the red line with the SQL code.
phpMyAdmin – A software to manage MySql Database
<h2 id="require" style="font-family: sans-serif; max-width: 70em;">
Requirements
</h2>
<ul style="font-family: sans-serif; margin: 1em; max-width: 70em;">
<li style="margin-top: 0.5em;">
<b>PHP</b> <ul style="margin: 1em 1em 0px; max-width: 70em;">
<li style="margin-top: 0.5em;">
You need PHP 5.2.0 or newer, with <tt>session</tt> support and the Standard PHP Library (SPL) extension.
</li>
<li style="margin-top: 0.5em;">
To support uploading of ZIP files, you need the PHP <tt>zip</tt> extension.
</li>
<li style="margin-top: 0.5em;">
For proper support of multibyte strings (eg. UTF-8, which is currently default), you should install mbstring and ctype extensions.
</li>
<li style="margin-top: 0.5em;">
You need GD2 support in PHP to display inline thumbnails of JPEGs ("image/jpeg: inline") with their original aspect ratio
</li>
<li style="margin-top: 0.5em;">
When using the "cookie" authentication method, the <tt>mcrypt</tt> extension is strongly suggested for most users and is <b>required</b> for 64–bit machines. Not using mcrypt will cause phpMyAdmin to load pages significantly slower.
</li>
<li style="margin-top: 0.5em;">
To support upload progress bars.
</li>
</ul>
</li>
<li style="margin-top: 0.5em;">
<b>MySQL</b> 5.0 or newer (details);
</li>
<li style="margin-top: 0.5em;">
<b>Web browser</b> with cookies enabled.
</li>
</ul>
sudo apt-get install phpmyadmin
... [READ MORE]