Welcome to Dream.In.Code
Getting Help is Easy!

Join 136,267 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,222 people online right now. Registration is fast and FREE... Join Now!




click counter

 
Reply to this topicStart new topic

click counter, need some help here

pure_evil020
30 Aug, 2008 - 08:56 PM
Post #1

New D.I.C Head
*

Joined: 31 Jul, 2008
Posts: 4

Hi there, I am a noob at HTML so please bare with me...

I have an internet site set up, and
here is what i'm trying to acheive:

i'm putting links to other people's webpages ("guest book/post comment" section) on my website, I want to make it so when they click one of these links, it opens it up within my own website.

then when they click "submit comment", it will record somewhere that they have submitted a comment on that person's site.


would someone be willing to help me out?

User is offlineProfile CardPM
+Quote Post

BetaWar
RE: Click Counter
30 Aug, 2008 - 09:40 PM
Post #2

#include <soul.h>
Group Icon

Joined: 7 Sep, 2006
Posts: 2,020



Thanked: 81 times
Dream Kudos: 1175
My Contributions
You will need to get databases set up to work with this. That means you will be needing to have server-side support (I suggest PHP, but there are a number of other server side languages out there that can accomplish the same thing).

What you will need to do is create a database with a talbe for the links, and one for the comments (the links and comments will be connected by a unique id between the 2; thus all links have a different id and all comments have the id of the link they are for).

Then you will need to create a php file that takes a user's input and adds it to a database. and another file that gets all the comments for a specific link.

Hope that helps.
User is offlineProfile CardPM
+Quote Post

Andora
RE: Click Counter
30 Aug, 2008 - 11:39 PM
Post #3

D.I.C Head
**

Joined: 18 Aug, 2008
Posts: 104


My Contributions
I'm not entirely sure what you are after... But if you want a simple visitor counting code:
CODE
<?php
$fn=fopen("visits.txt","w");
fwrite($fn,file_get_contents("visits.txt")+1);
fclose($fn);
?>
This uses php to create a .txt file with a number in it, that number is the number of views on that page.

Note that you will need to create visits.txt and put 0 in it to get it started.

This post has been edited by Andora: 30 Aug, 2008 - 11:40 PM
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 04:48AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month