kurdishvoice
11-03-2004, 04:19 PM
im have this small piece of php code where it simply reloads the pageand changes th eid room but must keep the username the same.
the file checkuser.php passes the $username variable to login_success.php
this piece of code is in login_success.php
<SCRIPT>
var enablecookies="<?php echo $_REQUEST['on'] ?>";
var enablemenu="no";
var roomID = '<?php echo $roomID ?>';
var width = 600;
var height = 360;
var name = '<?php echo $username ?>';
var mode = 0;
</script>
function Room1()
{
window.location.reload('login_success.php?roomID=961&username=$username');
}
The code above works for the roomID but the username always changes, it must be the value from '<?php echo $username ?>' but i am not sure how to keep it constant.
the file checkuser.php passes the $username variable to login_success.php
this piece of code is in login_success.php
<SCRIPT>
var enablecookies="<?php echo $_REQUEST['on'] ?>";
var enablemenu="no";
var roomID = '<?php echo $roomID ?>';
var width = 600;
var height = 360;
var name = '<?php echo $username ?>';
var mode = 0;
</script>
function Room1()
{
window.location.reload('login_success.php?roomID=961&username=$username');
}
The code above works for the roomID but the username always changes, it must be the value from '<?php echo $username ?>' but i am not sure how to keep it constant.