I have 2 pages, one PHP and one Javascript.
I'd like to pass the variable from this PHP script on one page:

```
$strFind="SELECT * FROM  cometchat_chatrooms_users WHERE userid=$curmemid";
$result=mysql_query($strFind) or die(mysql_error());
$row=mysql_fetch_array($result);
$room=$row['chatroomid'];

```

to this Javascript on another page:

```
var timestamp = 0;
var currentroom = $room;
var heartbeatTimer;
var minHeartbeat = 3000;
var maxHeartbeat = 12000;

```

How can I do this?