Hey,
I am getting an error on one of my website pages. If you take a look at this link:-
http://www.judgethejob.com/vinny/join-us/
You will i get this error:-
Now, i have the following code and i have ob_start which i thought would prevent this error..?Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /domains/judgethejob.com/http/vinny/join-us/index.php:11) in /domains/judgethejob.com/http/vinny/join-us/index.php on line 204
How can i prevent this?PHP Code:<?php
session_start();
ob_start();
if (isset($_POST['btn-submit']))
{
include("../conn.php");
$emailcheck = $_POST['txt_email'];
$email_check = mysql_query("SELECT email FROM tbl_members WHERE email = '$emailcheck'") or die(mysql_error());
$email_check2 = mysql_num_rows($email_check);
if ($email_check2 != 0) {
echo "<p>Sorry, the email '".$_POST['txt_email']."' is already in use. <a href='javascript:history.go(-1)'> Return</a> to amend.</p>";
}
else
{
$insert = "INSERT INTO tbl_members(username, password, email, gender, postcode, DOB, education, date_added) VALUES
(
// Insert here...
)";
$add_member = mysql_query($insert);
$from = "ibrar@freemanholland.com";
$headers = "From: $from";
$to = $_POST['txt_email'];
$subject = "This is a test";
$body = "Thank you for registering with Judge the Job.
One of our team will contact you within 24 hours about
your registration to confirm your details. If ok we will
make your account active and you will be able to place your
offer immediately.
Meanwhile please keep your login details safe: E-mail: ".$_POST['txt_email']." Password: ".$_POST['txt_password']."";
//$body = "Thank you for registering on our website. Your login details are as follows:- Email Address: ".$_POST['txt_email']." and Username: ".$_POST['txt_username']."";
if (mail($to, $subject, $body, $headers)) {
echo("<p>Many thanks for registering – one of our team will contact you within 24 hours about your registration to confirm your details. If ok we will make your account active and you will be able to place your offer immediately.</p>");
} else {
echo("<p>Message delivery failed... please try again later, or contact the administrator.</p>");
}
}
}
Regards








Bookmarks