Jump to content

Recommended Posts

I got a project that i am doing right now. But i got no clue on how to do it.

It's about a user login and click on some image, but you will need to track down the number of images the user click and store the data in my SQL

For example:

There are 50 images in click.php, and everytime the user click the image we will track it by using session and save the number of images the User click in MYSQL.

The function that i need are the following :
1: User click track (session) with data store in mySQL
2: A click limit (the user can only click 20 image per day)
3: After the image has been click by the user, it can't be click anymore till all the image has been click by the user then the whole image clicking will restart again. (optional)

That's all i need to know. It will be great if anyone can help me find any tutorial related to those function because i can't find any or give me some example of code related to those function.

Thanks.
Link to comment
https://forums.phpfreaks.com/topic/32849-solved-new-to-php-need-some-help/
Share on other sites

[quote author=ober link=topic=120992.msg496855#msg496855 date=1167923621]
This sounds like a homework assignment.  We're not here to do your homework for you.  Besides, portions of that would be better done in Javascript, not PHP.
[/quote]

Sorry but i am not telling you guys to help me do my homework.
I say : [b]It will be great if anyone can help me find any tutorial related to those function because i can't find any [/b]

PC nerd: That's a good idea, maybe i will try it. Thanks for the help.
[quote]It will be great if anyone can help me find any tutorial related to those function because i can't find any[/quote]

Those [i]functions[/i] don't exist, you will need to create them. Id'e suggest reading [url=http://hudzilla.org/phpwiki/index.php?title=Main_Page]this[/url].
youd need to do something like this ( im writing this as i think of it here, so be prepared for numerous mistakes)
[code]
<a href = page.php?Image=1>Link</a>
[/code]


thats the link on the page. you could put the <img> tag where ive said link

[code]
<?php

if($Image == 1) {

$_SESSION['image_clicks'] +=1;

echo "//Javascript code here to redirect user back to your original page, if you need i can look that up in one of my books";

?>


i hope that helps, although youll have to add code to create the session, or you could use cookies, or whatever...
[/code]
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.