Closed Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2002
    Posts
    5,094

    $10 to fix this for me PHP

    Should be an easy fix but I cant get it

    Testing PhpESP survey script from cpanel

    Script works great , has all the features I needed

    But cannot include the survey into html page without error message..survey appears but also the error at the top of the page

    This is how the survey is comes from the server ..just fine

    http://airlines.ws/surveys/public/su...p?name=USAIRWA

    But when adding the small script to the html page this is what comes up

    http://airlines.ws/testing2.php

    this is the include on the html page

    <?php $sid=5; include("/home/airlines/public_html/surveys//public/handler.php");?>

  2. #2
    Join Date
    Mar 2003
    Location
    Behind your curtains
    Posts
    4,790
    ok this is a common problem
    right at the top of your php page (the first one that gets included if need be) put this:
    ob_start();

    That'll fix it. And don't worry about the $10

  3. #3
    Join Date
    Mar 2003
    Location
    Behind your curtains
    Posts
    4,790
    should've mentioned put it in the php tags - ie
    <? ob_start(); ?>

  4. #4
    Join Date
    Nov 2002
    Posts
    5,094
    Originally posted by Rob
    ok this is a common problem
    right at the top of your php page (the first one that gets included if need be) put this:
    ob_start();

    That'll fix it. And don't worry about the $10
    Rob I've tried it in a number or positions with no luck ..where does it go ?

    <html>

    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title></title>
    </head>

    <body>
    <?php $sid=5; include("/home/airlines/public_html/surveys//public/handler.php");?>
    </body>

    </html>

  5. #5
    Join Date
    Mar 2003
    Location
    Behind your curtains
    Posts
    4,790
    Right at the beginning of the page
    ie
    <? ob_start();?>
    <html>
    blah blah

    However if your file is including another file then the included file will have to have the ob_start(); at the beginning

    It is because once html is output to the screen PHP cannot process sessions or cookies. The ob_start() command tells the compiler to with-hold ALL output until the full page has been processed.

  6. #6
    Join Date
    Nov 2002
    Posts
    5,094
    Originally posted by Rob
    Right at the beginning of the page
    ie
    <? ob_start();?>
    <html>
    blah blah

    However if your file is including another file then the included file will have to have the ob_start(); at the beginning

    It is because once html is output to the screen PHP cannot process sessions or cookies. The ob_start() command tells the compiler to with-hold ALL output until the full page has been processed.
    Beautiful..that works..I was reading up on the error code and sessions but couldnt find any plain english...all tech speak without the actual solution.

    much appreciate ..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  

Sponsors

   
 
DomainState.com
Advertise   |   Contact Us   |   Domain Glossary   |   Domain Links   |   Domain Tools   |   FAQ   |   Members   |   Terms   |   RSS   |   Link To Us
Other Related Trellian Services:
Above Domain Parking Manager   |   Free Search Toolbar   |   Free Webpage Builder   |   Keyword Research   |   Search Engine Submission   |   SEO Tools
Copyright © 2002    DomainState.com a Trellian Company