Forum Moderators: open

Message Too Old, No Replies

Collecting visitor's names

and how to create a list

         

Wolf_man

3:22 pm on Aug 5, 2005 (gmt 0)

10+ Year Member



Im not sure if/how this can be done with Javascript or not, but I have a page where a Javascript prompt pops up and asks for the visitors name (which then becomes a varible, so the site says "welcome visitorsname").

is there a way for me to save a list of the visitors names, so that there can be a section which says:

people who have visited this site:
visitorname1
visitorname2
ect...

but also, I need it so the list omits entries that are blank.

any help that could step me in the right direction would be great.

garann

8:13 pm on Aug 5, 2005 (gmt 0)

10+ Year Member



To save anything for longer than the duration of the user's session, you need access to the server. Conventional Javascript can't give you that, unfortunately. You should be able to do this very easily with a little server side scripting.

NoLimits

4:28 pm on Aug 6, 2005 (gmt 0)

10+ Year Member



You're going to want to venture into the world of PHP and MYSQL databases for something like this.

Learning how to do so can make your website 100000 times more user interactive.

I have something like this setup to record LOADS of information about my visitors.

... I guess you could do it, almost using solely JavaScript, but you'd have to make a script to insert the data you want to collect into a form textarea/text and then make any clickable link from there not only take them to a new page, but submit the invisible form containing information about their stay.

It would be way tedious, but could be done.

Your best bet is to go with some kind of a database that you can pull from. (MySql in conjunction with PHP does this nicely)