0

hi i have the following form where a member chooses how long they want to be be displayed on another page like example below

<select name="hours"> <option value="1"<?php if(!empty($hours)) {?><?php if($_POST['hours']=="1") { echo "selected"; } ?><?php }?>>1</option> <option value="3"<?php if(!empty($hours)) {?><?php if($_POST['hours']=="3") { echo "selected"; } ?><?php }?>>3</option> <option value="6"<?php if(!empty($hours)) {?><?php if($_POST['hours']=="6") { echo "selected"; } ?><?php }?>>6</option> <option value="9"<?php if(!empty($hours)) {?><?php if($_POST['hours']=="9") { echo "selected"; } ?><?php }?>>9</option> <option value="12"<?php if(!empty($hours)) {?><?php if($_POST['hours']=="12") { echo "selected"; } ?><?php }?>>12</option> </select>

What would i need to put in to make sure a username disappears of the list would it be some sort of time out script

and help would be much appreciated ty jan

2
Contributors
1
Reply
20
Views
8 Months
Discussion Span
Last Post by diafol
0

The username will stay on the page indefintely until the page is closed. If you want it to disappear at a particular time, then you may need to poll the server at regular intervals (ajax). You're using php, so pages aren't updated. Using js you can certainly get this to work, but with a timer - but you then you may have to keep a list of times for each individual in a variable/object.
You'd be able to do this (I think) in nodejs. Also with websockets - but they can be fiddly to set up.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.