Cassase Posted January 4, 2007 Share Posted January 4, 2007 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 SQLFor 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 mySQL2: 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 More sharing options...
ober Posted January 4, 2007 Share Posted January 4, 2007 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. Link to comment https://forums.phpfreaks.com/topic/32849-solved-new-to-php-need-some-help/#findComment-152938 Share on other sites More sharing options...
PC Nerd Posted January 4, 2007 Share Posted January 4, 2007 just a pointer in the right direction.id use the images as links to a page, that adds the information to the session array, and thenk redirects to the click.php Link to comment https://forums.phpfreaks.com/topic/32849-solved-new-to-php-need-some-help/#findComment-153114 Share on other sites More sharing options...
Cassase Posted January 5, 2007 Author Share Posted January 5, 2007 [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. Link to comment https://forums.phpfreaks.com/topic/32849-solved-new-to-php-need-some-help/#findComment-153264 Share on other sites More sharing options...
trq Posted January 5, 2007 Share Posted January 5, 2007 [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]. Link to comment https://forums.phpfreaks.com/topic/32849-solved-new-to-php-need-some-help/#findComment-153353 Share on other sites More sharing options...
PC Nerd Posted January 5, 2007 Share Posted January 5, 2007 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]<?phpif($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] Link to comment https://forums.phpfreaks.com/topic/32849-solved-new-to-php-need-some-help/#findComment-153385 Share on other sites More sharing options...
Cassase Posted January 5, 2007 Author Share Posted January 5, 2007 Alright guys, thanks for the help. I think i will know what to do next. :) Link to comment https://forums.phpfreaks.com/topic/32849-solved-new-to-php-need-some-help/#findComment-153391 Share on other sites More sharing options...
PC Nerd Posted January 5, 2007 Share Posted January 5, 2007 glad i could help Link to comment https://forums.phpfreaks.com/topic/32849-solved-new-to-php-need-some-help/#findComment-153393 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.