echo "<script type='text/javascript'>alert('{$variable}'); window.location.href = '{$variable_contain_the_locaction}'; </script>