Title: php contact form hell :(
Last modified: August 19, 2016

---

# php contact form hell :(

 *  [g3legacy](https://wordpress.org/support/users/g3legacy/)
 * (@g3legacy)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/php-contact-form-hell/)
 * I’m writing a php contact from using a PHP book. Its seems to work well, the 
   contact form is located on one page, the user submits info and fires a new script
   that checks the content. I can’t however get this to work with wordpress….i’ve
   made the first contact form script into a template which has become my contact
   us page. The second script will not work as another template. I cant link the
   two together.
 * Ive tried trying to put both scripts on one page but the $_SERVER[‘php_self’]
   command will not work. It either returns to the site root or won’t find (404)
   the other script.
 * Its generally doing my head in, any ideas? I really want to learn this, not use
   a plug in. I understand what the php script is doing so this has become very 
   frustrating.
 * Any help is appreciated, Dan

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/php-contact-form-hell/#post-1839226)
 * You need to, effectively, write a plugin.
 *  [Kovacic](https://wordpress.org/support/users/kovacic/)
 * (@kovacic)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/php-contact-form-hell/#post-1839229)
 * Also you may want to check the variables you are using and make sure you are 
   cont conflicting with wordpress native variables. You can get a contact script
   from almost anywhere on the net, take that and integrate it as a plugin. Just
   make sure your variables don’t bump heads.
 *  Thread Starter [g3legacy](https://wordpress.org/support/users/g3legacy/)
 * (@g3legacy)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/php-contact-form-hell/#post-1839236)
 * Hi, thanks for the replies.
 * [@esmi](https://wordpress.org/support/users/esmi/) – I have no experience of 
   writing a plugin, only normal php (not a wordpress site) or making themes with
   wordpress. Where would you recommend I start if i’m to properly integrate a plug
   in?
 * [@kovacic](https://wordpress.org/support/users/kovacic/) – yes good point, i’m
   usually aware of this but I will check through once more. I’m generally using
   my own variables and sending the form content with posts. I just can’t get to
   the next page to get the content from the form and check it.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/php-contact-form-hell/#post-1839274)
 * Start with [Writing_a_Plugin](http://codex.wordpress.org/Writing_a_Plugin)

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘php contact form hell :(’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 3 participants
 * Last reply from: [esmi](https://wordpress.org/support/users/esmi/)
 * Last activity: [15 years, 5 months ago](https://wordpress.org/support/topic/php-contact-form-hell/#post-1839274)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
