2 decima places & How to reload my page

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
adsegzy
Forum Contributor
Posts: 184
Joined: Tue Jul 28, 2009 9:26 am

2 decima places & How to reload my page

Post by adsegzy »

Hello There,

How do i put full-stop (.) after second figure from behind? ie if i have 123456 in my database and i want it to echo as 1234.56

Secondly, am designing a shopping website. I want the pages to be refreshed after every 5 minutes of usage that is, after the customer might have login to his account and the page is opened for 5 minutes without any operation on the page, i want the page to redirect the customers to login page if the customer now try to use the page after 5 minute o idleness of the page and when he might have login again he should be directed to the page where he was.



Regards
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: 2 decima places & How to reload my page

Post by requinix »

1. Considered dividing by 100?

2.

Code: Select all

header("Refresh: 300; url=/path/to/login/page");
or

Code: Select all

<meta http-equiv="refresh" content="300; url=/path/to/login/page">
Either way, there's no reliable way to force the user to visit that page after 5 minutes. This should only be for convenience (ie, you give them a "you have been logged out" notice).
Post Reply