Jump to content

Recommended Posts

From a Googled result:

 

<html>
<head> 
<title>Redirect to the right page</title> 
<META 
http-equiv="refresh" content="5;URL=http://www.indiana.edu/~smithclas/l200/">
</head>

(source)

 

Unless you are considering <head></head> the header -- and usually by "header" the HTTP header is meant -- then that's not in the header.

here's the code:

 

<?php

if (array_key_exists('_submit_check', $_POST)) {

// The submitted form is valid, so process it

process_form();

header( 'location:http://www.morseavenuedesign.com/CinemaSightLines.com/sample_forum.php' );

show_form();

}

else {

//The form wasn't submitted, so display

show_form();

}

 

this doesn't work, I get an error that says "Warning... head has already been sent..."

or just use my function instead of header()... saves ALOT of troubles! :-)

 

<?php
function redirect($filename="?", $delay="0", $die="0"){
if((!headers_sent())&&($delay=="0")) header('Location: '.$filename);
elseif($delay=="0"){
  echo '<script type="text/javascript">';
  echo 'window.location.href="'.$filename.'";';
  echo '</script>';
  echo '<noscript>';
  echo '<meta http-equiv="refresh" content="0;url='.$filename.'" />';
  echo '<noscript>';
}else echo '<meta http-equiv="refresh" content="'.$delay.';url='.$filename.'" />';
if($die=="0"){
  db_disconnect();
  exit;
}
}
?>

here's the code:

 

<?php

if (array_key_exists('_submit_check', $_POST)) {

// The submitted form is valid, so process it

process_form();

header( 'location:http://www.morseavenuedesign.com/CinemaSightLines.com/sample_forum.php' );

show_form();

}

else {

//The form wasn't submitted, so display

show_form();

}

 

this doesn't work, I get an error that says "Warning... head has already been sent..."

 

Does process_form() display any data, if so that is why.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.