track clicking<

liunx

Guest
is there anyway that i can get track the people who click a link by getting them to enter some details after the link is clicked, like when they click a submit button a javascript will appear asking them for there username.I know nothing about php so try to keep it simplehaving to login on every click would be irritating at the least.

do you want to monitor per user - or would the IP address of their PC be enough?


you can use the server variable $_SERVER['REMOTE_ADDR'] to get the IP address of their PC.


if you actually want to track by username, you will need to setup a login and session script which holds some information about hte user (like a username) after they have logged in.i only want them to enter there username when the click a link not evry link on the website do you know how i could do thisonly on one particular link...

have that link go to a form page instead, with the form:


<form action='original_target.php' method='post'>
Enter Name: <input type='name' /><br />
<button type='submit' id='submit' value='submit'>Submit</button>
</form>


then in the next file you need to check that they have entered a name - if not, then display the form again.

and finally, you need to put the information somewhere...

either a database or a flat-file.i didint want that i want it so that when you click on a link you a prompted for your username (which will not need to be verified) and after they have enterd there usernaem they are then alowed to enter the next page and i will b told when someone has enterd there usernamewell, in which case, miss the verification out.

but the rest of my last post should do it.
 
Back
Top