Title: Add a variable in Header statement
Last modified: August 20, 2016

---

# Add a variable in Header statement

 *  [x69chen](https://wordpress.org/support/users/x69chen/)
 * (@x69chen)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/add-a-variable-in-header-statement/)
 * Hi I am trying to make a header statement with a variable which could take the
   variable to the next page.
 * I tried
    `header('Location: http://url?id=$ID');`
 * But it does not work,probably WP pages does not contain extension
 * could someone help me? thanks

The topic ‘Add a variable in Header statement’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [x69chen](https://wordpress.org/support/users/x69chen/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/add-a-variable-in-header-statement/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
