Board index   FAQ   Search  
Register  Login
Board index PHP PHP Scripts

Need php script for Like/Dislike button

Links for php scripts

Moderators: macek, egami, gesf

Need php script for Like/Dislike button

Postby abhishekdeveloper » Mon Feb 13, 2012 1:14 am

Hey Guys,

I am developing a website in which there I need to take opinion of people on some images for a scientific experiment. Kindly provide me/help me with the php code for this purpose.


Thanks :D
abhishekdeveloper
New php-forum User
New php-forum User
 
Posts: 13
Joined: Tue Jan 17, 2012 3:32 am

Re: Need php script for Like/Dislike button

Postby Christopher » Mon Feb 20, 2012 7:40 am

Well you have two options you could use an ip system or a login system.
ip will something in the lines of :
<?php
$ip=$_SERVER['REMOTE_ADDR'];
//then add to db ip and the link of the image in a table where the combination is unique.
?>
login system
<?php
$id=$_SESSION['id'];
//then add to db id and the link of the image in a table where the combination is unique.
?>
The second option is better because the ip address is stored in the header and can be faked.
So you basically you will be some sql knowledge first.
Christopher
New php-forum User
New php-forum User
 
Posts: 3
Joined: Mon Feb 20, 2012 7:31 am


Return to PHP Scripts

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron