RE: newbie

From: Date: Wed, 08 Aug 2001 17:33:43 +0000
Subject: RE: newbie
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-61876@lists.php.net to get a copy of this message
hi, try this: #### track.sql #### CREATE TABLE table_track ( tid int(11) NOT NULL auto_increment, ip varchar(15) NOT NULL, PRIMARY KEY (tid), UNIQUE tid (tid), KEY tid_2 (tid) ); ##### #### <?php $host = "localhost"; $user = "dbuser"; $pass = "dbpass"; $db = "database"; $dbconnect = mysql_connect($host, $user, $pass); mysql_select_db($db, $dbconnect); $query = mysql_query("INSERT INTO table_track (ip) VALUES ('$REMOTE_ADDR')"); ?> that would insert the users ip into the table table_track ... check it out... i hope i could help you best regards attila > Hi, I'm a real newbie at this stuff and I have a little problem... I read > the manual but the answer to my questions were not clear. What I am trying > do do is track down a user when he or she visits my site. I would like to > store some information about them into mySql...Information like, username, > ip, connection and most importantly what page of my site it is that they > visited...I'm not sure if I have to use cookies or sessions or both and I > especially don't know where to start...... > > Can anyone give me some information or a link other than php.net > PLEASE................thank you. > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#61876) next »