justAnoob Posted June 12, 2009 Share Posted June 12, 2009 I have a session that is displayed.... I only want it to display for 10 seconds... What should I do below? <?php if($count > 0) { $_SESSION['dup'] = "This username is already registered. Please try again."; } ?> <?php if(isset($_SESSION['dup'])) { set_time_limit(10); //this doesn't work.. where to put it? echo '<div class="duppy">'; echo $_SESSION['dup']; echo '</div>'; } ?> Quote Link to comment Share on other sites More sharing options...
haku Posted June 12, 2009 Share Posted June 12, 2009 You can't really do this - php cannot make something disappear on the users computer (client side) without a page refresh. So the best you can do is refresh the page after 10 seconds: header('refresh: 10; url=/page/to/load/after/10/seconds'); Quote Link to comment Share on other sites More sharing options...
justAnoob Posted June 12, 2009 Author Share Posted June 12, 2009 thank you. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.