![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
yes, they are logged in that way, I am just not sure HOW to track them with that? how do i dump that info into a database? some sort of hidden input record form? |
#2
| |||
| |||
|
|
I would like to keep track of who is logging in (cookie) and what pages they go to, what files they download would be an added bonus. (php/MySQL) I don't understand the code for how to insert the information into a database table. My tracking database table (userData) has the following fields: userID, pageVisited, filesDownloaded the pages these people will be using already has accessLevel code on each page: ?php if(!isset($HTTP_COOKIE_VARS['levelCookie'])){ header("Location: secure.php"); } else { if($HTTP_COOKIE_VARS['levelCookie'] < 2){ header("Location: secure.php"); } } ? can someone help me with an example of how the code would work for inserting this data into a table? thanks!! __________________________________________________ __ Specifically, what do want to track regarding user logins - last login date/time? number of time user has logged in? something else? To track who has downloaded what files, create a userDownloads table and everytime some downloads a file write a record inserting the userID and fileID. "melissa" <melissa (AT) maddesignusa (DOT) com> wrote in message news:ce835b$j87$1 (AT) forums (DOT) macromedia.com... yes, they are logged in that way, I am just not sure HOW to track them with that? how do i dump that info into a database? some sort of hidden input record form? |
#3
| |||
| |||
|
|
change your tables: userData: UserID visitData: UserID URL DateTime // connect to db; // INSERT INTO visitData (UserID,URL,DateTime) VALUES ($userid,$_SERVER["PHP_SELF"],now()); // close db connection; ? more help: http://dev.mysql.com/doc/mysql/en/INSERT.html http://us2.php.net/manual/en/ref.mysql.php joe melissa wrote: I would like to keep track of who is logging in (cookie) and what pages they go to, what files they download would be an added bonus. (php/MySQL) I don't understand the code for how to insert the information into a database table. My tracking database table (userData) has the following fields: userID, pageVisited, filesDownloaded the pages these people will be using already has accessLevel code on each page: ?php if(!isset($HTTP_COOKIE_VARS['levelCookie'])){ header("Location: secure.php"); } else { if($HTTP_COOKIE_VARS['levelCookie'] < 2){ header("Location: secure.php"); } } ? can someone help me with an example of how the code would work for inserting this data into a table? thanks!! __________________________________________________ __ Specifically, what do want to track regarding user logins - last login date/time? number of time user has logged in? something else? To track who has downloaded what files, create a userDownloads table and everytime some downloads a file write a record inserting the userID and fileID. "melissa" <melissa (AT) maddesignusa (DOT) com> wrote in message news:ce835b$j87$1 (AT) forums (DOT) macromedia.com... yes, they are logged in that way, I am just not sure HOW to track them with that? how do i dump that info into a database? some sort of hidden input record form? |
#4
| |||
| |||
|
#5
| |||
| |||
|
|
ok, now i have the code working to put the information into the database, but can't get the date/time to work ? $user = $_COOKIE['acCookie']; $page = $_SERVER['SCRIPT_FILENAME']; // gets current url mysql_query ("INSERT INTO visitData (userID, URL, DateTime) VALUES ('$user','$page','now()')"); ? any ideas? |
#6
| |||
| |||
|
|
ok, now i have the code working to put the information into the database, but can't get the date/time to work ? $user = $_COOKIE['acCookie']; $page = $_SERVER['SCRIPT_FILENAME']; // gets current url mysql_query ("INSERT INTO visitData (userID, URL, DateTime) VALUES ('$user','$page','now()')"); ? any ideas? |
![]() |
| Thread Tools | |
| Display Modes | |
| |