Problem with php + html

Discussion in 'PHP' started by Istvan, Apr 21, 2007.

  1. #1
    Hi! I'm having a problem with a php file, I'm trying to include this file into a html code page (I have put the <?php ... ?> code into a <td>...</td>)

    The php script have a form, when I press the submit button, it return me a "Warning: Cannot modify header information - headers already sent by..." error. This problem is between <meta name="keywords"... and the php part header("Location: $download");

    Instead if I put the <? php ... ?> at the beginning it works, but I need to put it in the <td>...</td> because I have made a design for it... :(

    Who can help me? (I'm not very expert with php :eek:)
    Thank you very much!
     
    Istvan, Apr 21, 2007 IP
  2. Meth_

    Meth_ Well-Known Member

    Messages:
    1,063
    Likes Received:
    72
    Best Answers:
    0
    Trophy Points:
    140
    #2
    well, once you've outputted text to the browser you can not redirect it unless you use javascript (bad idea, though)


    look up the function php.net/ob_start and php.net/ob_close
     
    Meth_, Apr 21, 2007 IP