Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-05-2013, 03:12 PM   PM User | #1
Jian0203
New Coder

 
Join Date: Mar 2012
Posts: 47
Thanks: 2
Thanked 0 Times in 0 Posts
Jian0203 is an unknown quantity at this point
Click counter on an image

Hi, everyone. I am new to server side programming and I face a challenge while i'm trying to develop a graphical password authentication system.

In my system, I wish to record the click counts of an user on his password(it's a set of images).

During enrollment, the user will set the click count(s) on 5 images and the click count(s) of each image will be recorded in the database(phpmyadmin).

When the user wants to login, the 5 images will be displayed, therefore, the user will need to click on each image with the correct click count to login.

I am wondering is it possible to do so ? I tried to search for some information online, but all i found is webpage or links click counter only. Can anyone please provide me some clue or guide on how can i do this ?

Thanks in advance. I appreciate your help a lots ^.^
Jian0203 is offline   Reply With Quote
Old 01-05-2013, 04:37 PM   PM User | #2
minkoko
New Coder

 
Join Date: Aug 2010
Location: myeik
Posts: 72
Thanks: 4
Thanked 5 Times in 5 Posts
minkoko can only hope to improve
PHP Code:
$image $_POST['image'];
$sql=mysql_query("SELECT image form table_name");
$row=mysql_fetch_array($sql);
$rowimg$row['image'];

if(
$image == "$rowimg"){
echo 
"login";
}else{
echo 
"Wrong image";

is it ?
__________________
Quote:
Myanmar Web Developer & Designer
http://www.cyberoot.com

Last edited by minkoko; 01-05-2013 at 04:40 PM..
minkoko is offline   Reply With Quote
Old 01-06-2013, 04:31 AM   PM User | #3
linek98
New Coder

 
Join Date: Dec 2012
Location: England
Posts: 18
Thanks: 0
Thanked 4 Times in 4 Posts
linek98 is an unknown quantity at this point
If you want to count clicks on image and send those clicks later to server-side script then the best choice is to use JavaScript. You should listen to "click" event of every single image. On click event you should increment clicks count of an image event occured on.

What I would do is create hidden inputs with default value of 0, each for every image. When user clicks an image, JavaScript increments it's corresponding input value. Values of those inputs will be sent together with login form so you can access them in PHP.
linek98 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:27 PM.


Advertisement
Log in to turn off these ads.