Jump to content

java and php call


dragongamer

Recommended Posts

ok i want to make it so i can insert the time some one spent on a page in to a mysql data base the code i have is

[code]  <script  language="javascript"  type="text/javascript">      
<!-- Begin
pageOpen = new Date();
function bye() {
pageClose = new Date();
minutes = (pageClose.getMinutes() - pageOpen.getMinutes());
seconds = (pageClose.getSeconds() - pageOpen.getSeconds());
time = (seconds + (minutes * 60));
if (time == 1) {
time = (time + " second");
}
else {
time = (time + " seconds");
   }
alert('It has been ' + time + '.  ');
}
window.onunload = bye;
// End -->
</script>[/code]

how can i turn the java var ' + time + ' and make it into a in a $statment.
Link to comment
https://forums.phpfreaks.com/topic/7016-java-and-php-call/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.