found solution on this forum now have new error!

This is a discussion on "found solution on this forum now have new error!" within the PHP Forum section. This forum, and the thread "found solution on this forum now have new error! are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices




Reply
 
LinkBack Thread Tools
  #21  
Old Oct 24th, 2007, 16:59
alexgeek's Avatar
Moderator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,812
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
Re: found solution on this forum now have new error!

Try this ha:

PHP: Select all




    <?php

      ob_start
();

      
$title $_REQUEST['title'] ;

      
$firstname $_REQUEST['firstname'] ;

      
$lastname $_REQUEST['lastname'] ;

      
$email $_REQUEST['email'] ;

      
$location $_REQUEST['location'] ;

      
$locother  $_REQUEST['locother'] ;

      
$message $_REQUEST['message'] ;

      
$findus $_REQUEST['findus'] ;



    if (!isset(
$_REQUEST['email'])) {

        
header"Location: 

http://www.solidmasonry.co.nz/quote.html
);



    } else if (empty(
$email) || empty($message)) {//removed output
    
} else {



        
$embody "$title $firstname $lastname $email $location 

$locother $message $findus"
;


        
mail"katrina.lemon@gmail.com""Quote Form",

         
$embody"From: $email" );

        
header"Location: 

http://www.solidmasonry.co.nz/index.html
);

      }

ob_end_flush

    ?>
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #22  
Old Oct 24th, 2007, 17:05
Junior Member
Join Date: Sep 2007
Location: Cumbria
Age: 24
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Re: found solution on this forum now have new error!

Warning: Cannot modify header information - headers already sent by (output started at D:\vhosts\solidmasonry.co.nz\httpdocs\sendmail.php :5) in D:\vhosts\solidmasonry.co.nz\httpdocs\sendmail.php on line 51
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #23  
Old Oct 24th, 2007, 17:33
Reputable Member
Join Date: Jun 2007
Location: uk
Posts: 459
Thanks: 0
Thanked 0 Times in 0 Posts
Re: found solution on this forum now have new error!

can you make sure you have <?php on line 1 of your page
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #24  
Old Oct 24th, 2007, 17:38
alexgeek's Avatar
Moderator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,812
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
Re: found solution on this forum now have new error!

What's line 51?
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #25  
Old Oct 24th, 2007, 17:45
Junior Member
Join Date: Sep 2007
Location: Cumbria
Age: 24
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Re: found solution on this forum now have new error!

Warning: Cannot modify header information - headers already sent by (output started at D:\vhosts\solidmasonry.co.nz\httpdocs\sendmail.php :1) in D:\vhosts\solidmasonry.co.nz\httpdocs\sendmail.php on line 47

PHP: Select all

         <?php

          ob_start
();

          
$title $_REQUEST['title'] ;

          
$firstname $_REQUEST['firstname'] ;

          
$lastname $_REQUEST['lastname'] ;

          
$email $_REQUEST['email'] ;

          
$location $_REQUEST['location'] ;

          
$locother  $_REQUEST['locother'] ;

          
$message $_REQUEST['message'] ;

          
$findus $_REQUEST['findus'] ;



        if (!isset(
$_REQUEST['email'])) {

            
header"Location: 

    http://www.solidmasonry.co.nz/quote.html
);



        } else if (empty(
$email) || empty($message)) 

{
//removed output
        
} else {



            
$embody "$title $firstname $lastname $email 

$location 

    $locother $message $findus"
;


            
mail"katrina.lemon@gmail.com""Quote Form",

             
$embody"From: $email" );

            
header"Location: <--Line 47

                     http://www.solidmasonry.co.nz/index.html
); 

          }

    
ob_end_flush

        ?>

Last edited by xkatx21x; Oct 24th, 2007 at 17:57.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #26  
Old Oct 24th, 2007, 18:21
Junior Member
Join Date: Sep 2007
Location: Cumbria
Age: 24
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Re: found solution on this forum now have new error!

PHP: Select all

            header"Location: <--Line 47

                     http://www.solidmasonry.co.nz/index.html
); 

          } 
I think this is the problem but I don't know why.

This is the line that the error points to each time.

If I delete this line there is no error found but obviously then it doesn't forward to a new page.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #27  
Old Oct 24th, 2007, 18:30
alexgeek's Avatar
Moderator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,812
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
Re: found solution on this forum now have new error!

This is the full page?
there's nothing before the first: <?php tag?
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #28  
Old Oct 24th, 2007, 18:33
Junior Member
Join Date: Sep 2007
Location: Cumbria
Age: 24
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Re: found solution on this forum now have new error!

Yep thats all there is
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #29  
Old Oct 24th, 2007, 18:35
alexgeek's Avatar
Moderator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,812
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
Re: found solution on this forum now have new error!

I'm pretty stumped. I don't see any output so therefore don't see why it should do that.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #30  
Old Oct 24th, 2007, 18:41
Junior Member
Join Date: Sep 2007
Location: Cumbria
Age: 24
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Re: found solution on this forum now have new error!

great even the experts don't know what's wrong!

I think I'll just stick to a mailto link its a lot easier
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #31  
Old Oct 24th, 2007, 18:45
alexgeek's Avatar
Moderator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,812
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
Re: found solution on this forum now have new error!

Only thing I can think of is that there's an option to output something at the start of every document in php.ini , If this has been set by you or your host it will cause the script to fail.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #32  
Old Oct 24th, 2007, 18:50
Junior Member
Join Date: Sep 2007
Location: Cumbria
Age: 24
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Re: found solution on this forum now have new error!

In my host controlpanel it has this option

PHP support (checkbox) Version 4.4.7 (run as ISAPI extension ) (checkbox)

would this have anything to do with it?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #33  
Old Oct 24th, 2007, 20:13
Reputable Member
Join Date: Jun 2007
Location: uk
Posts: 459
Thanks: 0
Thanked 0 Times in 0 Posts
Re: found solution on this forum now have new error!

just looked online and got this error.

Warning: Cannot modify header information - headers already sent by (output started at D:\vhosts\solidmasonry.co.nz\httpdocs\sendmail.php :1) in D:\vhosts\solidmasonry.co.nz\httpdocs\sendmail.php on line 27.

can you post your entire sendmail.php file.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #34  
Old Oct 24th, 2007, 20:24
Junior Member
Join Date: Sep 2007
Location: Cumbria
Age: 24
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Re: found solution on this forum now have new error!

PHP: Select all

         <?php

          ob_start
();

          
$title $_REQUEST['title'] ;

          
$firstname $_REQUEST['firstname'] ;

          
$lastname $_REQUEST['lastname'] ;

          
$email $_REQUEST['email'] ;

          
$location $_REQUEST['location'] ;

          
$locother  $_REQUEST['locother'] ;

          
$message $_REQUEST['message'] ;

          
$findus $_REQUEST['findus'] ;



        if (!isset(
$_REQUEST['email'])) {

            
header"Location: 

    http://www.solidmasonry.co.nz/quote.html
);



        } else if (empty(
$email) || empty($message)) 

{
//removed output
        
} else {



            
$embody "$title $firstname $lastname $email 

$location 

    $locother $message $findus"
;


            
mail"katrina.lemon@gmail.com""Quote Form",

             
$embody"From: $email" );

            
header("Location: 

    http://www.solidmasonry.co.nz/index.html
);

          }

    
ob_end_flush

        ?>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #35  
Old Oct 24th, 2007, 20:25
Junior Member
Join Date: Sep 2007
Location: Cumbria
Age: 24
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Re: found solution on this forum now have new error!

it says line 47 on mine
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #36  
Old Oct 24th, 2007, 20:44
alexgeek's Avatar
Moderator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,812
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
Re: found solution on this forum now have new error!

hmm, link me to the page? I want to investigate.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!