It has to do with the fact that you're using single quotes, and
$thepage is not replaced for its value.

I think you'd want to rewrite the function like this (note the \ escaping the "):

function js_pointer_login($thepage)
{
  echo "<script language=\"javascript\">  window.location = '$thepage'
</script>";
}


Hope this Helps, Oscar F.

Antoine wrote:
I wrote a function to redirect my page to another one. But for some
reason I keep getting an error. here is the function I made


function js_pointer_login($thepage)
{
 echo '<script language="javascript">  window.location = '$thepage'
</script>';
}





-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to