Jump to content

Header() Problem? What the hell.. quick help needed..


virtuexru

Recommended Posts

OK. I'm getting this error:

 

Warning: Cannot modify header information - headers already sent by (output started at /**/**/public_html/config/connect.php:7) in /**/**/public_html/config/register_user.php on line 84

 

For a registration page...

 

connect.php :

 

<?php

$connect = mysql_connect($dbhost, $dbuser, $dbpass);

@mysql_select_db($dbname) or die("Unable to select database");

?>

 

register_user.php line 84 :

 

    $request = "INSERT INTO table values('','$username',PASSWORD('$password'),'$email')";

    $insert_confirm = mysql_query($request);

    if($insert_confirm) 
    {
	$message = "<html><body>Please do not respond to this message. <p/>Congratulations, this is a confirmation of your registration submittal at PostMyDay.com. Welcome aboard!</body></html>";
	mail( $email , "Registration for aaa.com Successful", $message, "From: aaa.com" );

	$confirmation = "[email protected]";
	mail ( $confirmation , "New aaa User", $username , "From: aaa.com" );

	header ("Location: success.php");
	Die();
    }
    else
    {
        echo mysql_error();
	echo $username;
    }
    mysql_close();
    Die();

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.