Skip to main content

🛍️ BLACK FRIDAY get-one-give-one sale is underway. Don't miss $50 off PLUS a free subscription to gift a friend. 🤩

🚀 In our NEW AI Bootcamp you'll build a working app in 28 days, no experience required. Free to all subscription levels.

Join the Treehouse affiliate program and earn 25% recurring commission! 🤑

  • Treehouse Logo
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
    • All Courses
    • Tracks
    • AI Bootcamp
    • College Credit
    • Techdegree Bootcamps
    • Front End Development
    • Full Stack JavaScript
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
    • Explore
    • Career Toolbox
    • Free Treehouse Near Me
    • Affiliates
    • Blog
    • Support
    • About
    • Learn
    • Beginner's Guide to Coding
    • Data Analysis with SQL & Python
    • Front-End Web Development
    • Python Programming Basics
    • Techdegree Bootcamp Overview
    • UX Design Fundamentals
    • AI Tools for Beginners
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks AI Bootcamp College Credit
  • Techdegree Bootcamps Front End Web Development Full Stack JavaScript
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Explore Career Toolbox Free Treehouse Near Me Affiliates Blog Support About
    Learn Beginner's Guide to Coding Data Analysis with SQL & Python Front-End Web Development Python Programming Basics Techdegree Bootcamp Overview UX Design Fundamentals AI Tools for Beginners
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
Loading banner... Start your free trial at Treehouse
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • APIs
      • • Coding for Kids
      • • College Credit
      • • Computer Science
      • • CSS
      • • Data Analysis
      • • Databases
      • • Design
      • • Development Tools
      • • Digital Literacy
      • • Game Development
      • • Go Language
      • • HTML
      • • Java
      • • JavaScript
      • • Learning Resources
      • • Machine Learning
      • • No-Code
      • • PHP
      • • Professional Growth
      • • Python
      • • Quality Assurance
      • • React
      • • Ruby
      • • Security
      • • Swift
      • • Vibe Coding
  • Aaron Uusitalo
    Aaron Uusitalo
    4,405 Points

    Why don't the echo statements before the header method cause redirect failure?

    Posted May 1, 2019 2:24am by Aaron Uusitalo
    Aaron Uusitalo
    4,405 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Adding a Basic Form
    • Redirecting After a Form Submission

    3 Answers

  • Zijun Liao
    Zijun Liao
    13,409 Points

    Send string to browser before redirection

    Posted October 23, 2018 1:28am by Zijun Liao
    Zijun Liao
    13,409 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Adding a Basic Form
    • Redirecting After a Form Submission

    1 Answer

  • jlampstack
    jlampstack
    23,932 Points

    Where does PHP need to be installed for it to work?

    Posted May 25, 2018 1:25pm by jlampstack
    jlampstack
    23,932 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Adding a Basic Form
    • Redirecting After a Form Submission

    1 Answer

  • Loando.sc Suwik, Zastrzeżyński ul. Prosta 68 00-838 Warszawa ; NIP: 5223034263
    Loando.sc Suwik, Zastrzeżyński ul. Prosta 68 00-838 Warszawa ; NIP: 5223034263
    11,057 Points

    Variable $name problem

    Posted May 17, 2018 7:35am by Loando.sc Suwik, Zastrzeżyński ul. Prosta 68 00-838 Warszawa ; NIP: 5223034263
    Loando.sc Suwik, Zastrzeżyński ul. Prosta 68 00-838 Warszawa ; NIP: 5223034263
    11,057 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Adding a Basic Form
    • Redirecting After a Form Submission

    0 Answers

  • Brandon Jones
    Brandon Jones
    3,305 Points

    Header() function

    Posted January 22, 2018 10:42pm by Brandon Jones
    Brandon Jones
    3,305 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Adding a Basic Form
    • Redirecting After a Form Submission

    1 Answer

  • James Kenney
    James Kenney
    13,910 Points

    I keep getting sent to thanks.php when visiting my site.

    Posted January 9, 2018 3:44am by James Kenney
    James Kenney
    13,910 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Adding a Basic Form
    • Redirecting After a Form Submission

    2 Answers

  • David Choi
    David Choi
    8,536 Points

    Header Function Question

    Posted July 29, 2017 6:21am by David Choi
    David Choi
    8,536 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Adding a Basic Form
    • Redirecting After a Form Submission

    1 Answer

  • Vladislav Mavrin
    PLUS
    Vladislav Mavrin
    Courses Plus Student 3,125 Points

    thanks.php is a blank page

    Posted June 6, 2017 4:00pm by Vladislav Mavrin
    Vladislav Mavrin
    Courses Plus Student 3,125 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Adding a Basic Form
    • Redirecting After a Form Submission

    1 Answer

  • jlampstack
    jlampstack
    23,932 Points

    Protect form submission from Robots???

    Posted March 12, 2017 3:34pm by jlampstack
    jlampstack
    23,932 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Adding a Basic Form
    • Redirecting After a Form Submission

    1 Answer

  • Pai Boony
    PLUS
    Pai Boony
    Courses Plus Student 4,529 Points

    echo "<pre>"; doesn't work

    Posted February 21, 2017 8:40am by Pai Boony
    Pai Boony
    Courses Plus Student 4,529 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Adding a Basic Form
    • Redirecting After a Form Submission

    3 Answers

  • rob111
    rob111
    8,379 Points

    Warning: Cannot modify header information - headers already sent by

    Posted December 6, 2016 6:48am by rob111
    rob111
    8,379 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Adding a Basic Form
    • Redirecting After a Form Submission

    6 Answers

  • Carlos Enrique Castañeda Gutiérrez
    Carlos Enrique Castañeda Gutiérrez
    13,886 Points

    Question about header() and output_buffering

    Posted November 24, 2016 7:17pm by Carlos Enrique Castañeda Gutiérrez
    Carlos Enrique Castañeda Gutiérrez
    13,886 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Adding a Basic Form
    • Redirecting After a Form Submission

    0 Answers

  • Keefe Harris
    Keefe Harris
    4,950 Points

    Header()

    Posted June 28, 2016 8:25am by Keefe Harris
    Keefe Harris
    4,950 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Adding a Basic Form
    • Redirecting After a Form Submission

    1 Answer

  • jilliankramermcloughlin
    jilliankramermcloughlin
    3,428 Points

    enable output_buffering in php.ini to permit redirect

    Posted June 8, 2016 3:48pm by jilliankramermcloughlin
    jilliankramermcloughlin
    3,428 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Adding a Basic Form
    • Redirecting After a Form Submission

    2 Answers

  • rick harrison
    PLUS
    rick harrison
    Courses Plus Student 41 Points

    Form feilds

    Posted May 21, 2016 4:41am by rick harrison
    rick harrison
    Courses Plus Student 41 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Adding a Basic Form
    • Redirecting After a Form Submission

    1 Answer

  • amirmohammed
    amirmohammed
    1,944 Points

    I'm getting a duplicate header error

    Posted March 26, 2016 3:37pm by amirmohammed
    amirmohammed
    1,944 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Adding a Basic Form
    • Redirecting After a Form Submission

    3 Answers

  • Steven Chan
    Steven Chan
    6,526 Points

    Hitting back after landing on thanks.php, the suggest.php page still has the fields filled (not blank)

    Posted March 18, 2016 2:21am by Steven Chan
    Steven Chan
    6,526 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Adding a Basic Form
    • Redirecting After a Form Submission

    3 Answers

  • Shafeeq Ahmed
    Shafeeq Ahmed
    6,058 Points

    Code before header

    Posted February 18, 2016 10:39am by Shafeeq Ahmed
    Shafeeq Ahmed
    6,058 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Adding a Basic Form
    • Redirecting After a Form Submission

    1 Answer

  • Paulo Baptista
    PLUS
    Paulo Baptista
    Courses Plus Student 3,391 Points

    Redirect to thanks.php not working

    Posted January 26, 2016 11:26pm by Paulo Baptista
    Paulo Baptista
    Courses Plus Student 3,391 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Adding a Basic Form
    • Redirecting After a Form Submission

    2 Answers

  • Megan Weber
    Megan Weber
    32,795 Points

    Clarifiction about the video

    Posted January 16, 2016 3:07am by Megan Weber
    Megan Weber
    32,795 Points
    • PHP
    • Build a Basic PHP Website (2018)
    • Adding a Basic Form
    • Redirecting After a Form Submission

    0 Answers

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
SEE ALL

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
SEE ALL

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
SEE ALL

About Us

  • About
  • Blog
  • Community
  • Stories
  • Contact
  • Gift Card

Explore

  • Plans
  • Affiliates
  • Perks
  • Shop
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses

Treehouse is an online technology education platform founded in 2011. Treehouse offers more than 700 self-paced, video-based courses in web development, programming, data analysis, design, and AI, plus two project-based bootcamp programs in Front End Web Development and Full Stack JavaScript. Individual Treehouse plans start at $25 per month and include a 7-day free trial. Treehouse serves individual learners, businesses, schools, and public libraries. Cardholders at participating U.S. public libraries can use Treehouse for free. Select Treehouse courses, offered with University Pathways International, are recommended for college credit by ACE and NCCRS. Treehouse learners earn digital certificates for completed Tracks.

Terms & Conditions · Privacy · © 2026 Treehouse Island, Inc.
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
  • Discord