We have almost no information to go on, and no code to look at, how do you expect us to help you?
In any case, headers already sent indicates there's some kind of output before you're doing the redirect. I would check that.
sorry about that
index.php
PHP Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Printing Mob | High quality print at low cost</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="keywords" content="some keywords that best describe your business">
<meta name="description" content="a short description of your company">
<meta name="author" content="Wizm">
<!-- Mobile Specific Metas
================================================== -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<!-- Primary Page Layout
================================================== -->
<div class="container">
<div class="row">
<header class="span12">
<div class="logo dark">
<img src="http://printingmob.com/images/logo_red.png" draggable="false"/>
<h1>We are currently working on a awesome new site.</h1>
</div>
</header>
</div>
<div class="row">
<header class="span6">
<div class="description dark">
<p>We have been spending long hours in order to launch our new website. But for now enter the Referral Code we gave you!</p>
<?php
if (isset($_POST['submit']))
{
header("Location: http://easyonlineprint.com/?tracking=" . $_POST['code']);
}
?>
<form id="form1" name="form1" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<div class="row">
<header class="span6">
<div class="description dark">
<p>We have been spending long hours in order to launch our new website. But for now enter the Referral Code we gave you!</p>
<?php
if (isset($_POST['submit']))
{
header("Location: http://easyonlineprint.com/?tracking=" . $_POST['code']);
}
?>
Originally Posted by php.net/manual/en/function.header.php
Remember that header() must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP. It is a very common error to read code with include, or require, functions, or another file access function, and have spaces or empty lines that are output before header() is called. The same problem exists when using a single PHP/HTML file.
/!!\ mysql_ is deprecated --- don't use it! Tell your hosting company you will switch if they don't upgrade!/!!!\ ereg() is deprecated --- don't use it!
dalecosp "God doesn't play dice." --- Einstein "Perl is hardly a paragon of beautiful syntax." --- Weedpacket
Glad to hear it ... I hoped I'd given you enough direction.
Please go to the top of the page and use the "Mark Thread RESOLVED" link under the "Thread Tools" drop-down. Thanks, and welcome to PHPBuilder!
/!!\ mysql_ is deprecated --- don't use it! Tell your hosting company you will switch if they don't upgrade!/!!!\ ereg() is deprecated --- don't use it!
dalecosp "God doesn't play dice." --- Einstein "Perl is hardly a paragon of beautiful syntax." --- Weedpacket
I'd think it'd be best to learn Javascript in order to do that. Google for things like "check required fields" and you get stuff like this. I can tell you that the link is giving guidance in the direction you want to go; however, I note that it was written for ancient browsers, and it's likely that the JS there would need to be revised and brought "up to snuff" for modern browsers. Good luck!
/!!\ mysql_ is deprecated --- don't use it! Tell your hosting company you will switch if they don't upgrade!/!!!\ ereg() is deprecated --- don't use it!
dalecosp "God doesn't play dice." --- Einstein "Perl is hardly a paragon of beautiful syntax." --- Weedpacket
Bookmarks