Wrox Programmer Forums
|
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 8th, 2007, 04:20 AM
Registered User
 
Join Date: Sep 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to neebski
Default Auto Insert

Hey there, I am trying to put together a log type database of where each user goes and what pages they view. How can I automatically add an entry into my log db each time the page loads? (As of right now it only logs things when a button is pushed)

 
Old September 10th, 2007, 01:15 AM
Authorized User
 
Join Date: Sep 2007
Posts: 56
Thanks: 0
Thanked 1 Time in 1 Post
Default

The code that you have working for when a button is pushed should be the same (your just making it run) when the page loads. You could just put the code at the top of your php page...when it loads the code would run.

http://mynameissteve.com
 
Old September 16th, 2007, 07:12 PM
Registered User
 
Join Date: Sep 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to neebski
Default

Don't exactly know how to do that. Care to explain?

Thanks

 
Old September 20th, 2007, 06:26 PM
Authorized User
 
Join Date: Sep 2007
Posts: 56
Thanks: 0
Thanked 1 Time in 1 Post
Default

You need to copy the code that does logging when a button is clicked and just add it somewhere on your php page. So when the page loads the code is ran.

http://mynameissteve.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
How To insert auto increment ID to other table ibrhaim ASP.NET 1.0 and 1.1 Professional 4 December 8th, 2006 02:26 PM
How to insert 2 tables with same auto increment ID ibrhaim ASP.NET 1.0 and 1.1 Basics 1 December 7th, 2006 05:00 PM
Auto Refresh and Auto Delete deontae45 VB.NET 2002/2003 Basics 1 September 29th, 2006 04:53 PM
trigger to insert current date on insert kev_79 SQL Server 2000 3 January 23rd, 2006 05:58 PM
need help on auto encode rachelwong ASP.NET 1.0 and 1.1 Basics 1 December 11th, 2003 12:37 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.