Q: Redirecting someone I want to redirect someone to index.php, how do i do this? But not the "meta" method, because it needs to be in header, and i can not have it there. 

A: window.location.href = 'http://your-new-url.com';

or 
window.location.pathname = 'index.php';

if you need to use a relative pathname.

A: Do not use JavaScript for this. If the user has JavaScript disabled (or most likely is browsing with a browser without support for JavaScript), the redirection will not work.
From your PHP code, you can send an HTTP header to direct your user to the page of your choice. Use the header() function to do this.
header('Location: index.php');
exit; // Important, stops execution of PHP page

If PHP complains that it cannot send the header because data has already been sent to the browser, simply go to the top of your script and enable output buffering by using ob_start():
ob_start();

With output buffering enabled, you can send headers anywhere in your code since data is only sent at the end of your script.

PHP Documentation: header()
PHP Documentation: ob_start()


A: <script type="text/javascript">
window.location.href = "http://www.yoursite.com/index.php"
</script>


A: Use window.location
