you are trying to include a variable inside a single quoted string. change the echo line to this.
echo "<script language='javascript'> window.location = '$thepage'> </script>"; Jim ----- Original Message ----- From: "Antoine" <[EMAIL PROTECTED]> To: "php list" <[EMAIL PROTECTED]> Sent: Tuesday, March 18, 2003 2:52 PM Subject: [PHP] php and javascript > 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>'; > } > > > -- > Antoine <[EMAIL PROTECTED]> > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php