Title: header function not executing
Last modified: August 22, 2016

---

# header function not executing

 *  [broadlighter](https://wordpress.org/support/users/broadlighter/)
 * (@broadlighter)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/header-function-not-executing/)
 * I’m trying to use EzPHP to insert code that redirects visitors to another page.
 * I’m writing this for a Clickbank vendor and affiliate. The code evaluates the
   affiliates Hop ID and if found, redirects the visitor to another page. If it 
   isn’t that affiliate, then it displays the page the php code is written on.
 * Here’s the snippet:
    ————————— [php] $hop = $_GET[“hop”]; if ($hop === “glutenfree”){
   header(‘Location: [http://www.glutenfree-lowglycemic-diet.com/&#8217](http://www.glutenfree-lowglycemic-diet.com/&#8217););}[/
   php] ————————————-
 * I used echo “Hello World” to test the $_GET[“hop”] function
    and the If statement.
   They work. However the header function does not execute. How can I get my re-
   direct or is this PHP plugin only for displaying content on the page?
 * Thanks,
 * BL
 * [https://wordpress.org/plugins/ezphp/](https://wordpress.org/plugins/ezphp/)

The topic ‘header function not executing’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/ezphp_5052bd.svg)
 * [ezPHP for WordPress](https://wordpress.org/plugins/ezphp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ezphp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ezphp/)
 * [Active Topics](https://wordpress.org/support/plugin/ezphp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ezphp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ezphp/reviews/)

## Tags

 * [header](https://wordpress.org/support/topic-tag/header/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * 0 replies
 * 1 participant
 * Last reply from: [broadlighter](https://wordpress.org/support/users/broadlighter/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/header-function-not-executing/)
 * Status: not resolved