everything is workin except window.location
.can any one suggest reason for it. thank you in anticipation
<?php
session_start();
$_SESSION["visiting"]=$_GET['userid'];
echo $_SESSION["visiting"]." ".$_GET['userid'];
?>
<script type="text/javscript">
window.location="http://localhost/fi.php";

</script>

you could just use PHP redirect.

<?php
session_start();
$_SESSION["visiting"] = $_GET["userid"];
echo $_SESSION["visiting"." ".$_GET["userid"];
header("Refresh: 10; URL=http://localhost/fi.php"); //Refreshes after 10 seconds
?>

make sure this goes above <html> or you will get errors.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.