Re: how to initialize the php variable inside javascript function?

From: Date: Mon, 14 Aug 2000 15:31:00 +0000
Subject: Re: how to initialize the php variable inside javascript function?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-11613@lists.php.net to get a copy of this message
hi ami, i just asked the same question about half a week ago. this is what i have discovered... 1. you could do it implicitly... by logging the start_time, user_id, current_page, and referrer of every user, you can reconstruct the amount of time a user stays on one page... this is the method that i am probably going to use, but of course, you probably don't want to do this at real time... 2. you could write a page which handles a simple redirection and does a timestamp. so every link in your site (that you want to find out how long a user stays on for), you would do something like <a href="redirect.php?source=current_page.php&destination=destination.php"> this however, really complicates your site, because no link is direct. hope this helps. :) ---------------- remco chang bountyquest.com On Mon, 14 Aug 2000, ami wrote: > Hello Friends, > How can we at the server side have the information about "How > much time a user stayed on our page?". We at the client side can know > it, How to initialize the php variable inside the javascript function? > > > i need something like the following. > > function javascriptfun() > { > <?php > $abc = something; > ?> > } > > > Any kind of help is really needed and I will be very grateful for that. > > Thanking you, > From:- > Ami Choksi > > -- > 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 (#11613) next »