opening a application and updating database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sbettadpur
    New Member
    • Aug 2007
    • 121

    opening a application and updating database

    How to update the database and opening a application simultaneously.

    I am getting this kind of error when I click on the link for the first time. I'm using the header function to redirect the page.(To open the application)

    Warning: Cannot modify header information - headers already sent by (output started at /var/www/ad/k1.php:38) in /var/www/ad/k1.php on line 48
  • Gulzor
    New Member
    • Jul 2008
    • 27

    #2
    If you are using the header() func to redirect make sure that you do not output anything before that.

    If you open a connection to a database before the call to header() and that the connection fails, the error message echoed by php will bug the call to header() too.

    Comment

    • Atli
      Recognized Expert Expert
      • Nov 2006
      • 5062

      #3
      Try using Output Buffering to ensure nothing gets sent before the redirect.

      Comment

      Working...