Title: php question&#8230;
Last modified: August 18, 2016

---

# php question…

 *  [maya90](https://wordpress.org/support/users/maya90/)
 * (@maya90)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/php-question-2-2/)
 * don’t know if this correct place to ask this question.. why can only moderators
   post to “advanced” forum?? there should be a forum for php questions….
 * I don’t want to do a ‘mailto’ link for email in my blog.. in order to prevent
   the harvesting of my email address by spammers I never put my email address in
   my website and always do mail with a form.. I’m trying to do a form pg in my 
   blog.. if I copy index.php (so I get same header, footer, sidebar.. and form 
   in main area where posts normally are..) in same dir where index.php is, and 
   call it mail.php and remove everything inside it except the functions for the
   header, footer, and sidebar, i.e., leave like this (for testing for now):
 * <?php get_header(); ?>
    <div id=”content”> test — form here… </div> <?php get_sidebar();?
   > <?php get_footer(); ?>
 * I get this error:
 * Fatal error: Call to undefined function: get_header() in /home/francesb/public_html/
   home/mail.php on line 1
 * why do I get this error when this file is in same location as index.php…
 * thank you…

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

 *  Thread Starter [maya90](https://wordpress.org/support/users/maya90/)
 * (@maya90)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/php-question-2-2/#post-639901)
 * PS: I do know how to do the back-end to send email, in fact I have it running
   successfully here:
 * [http://francesblog.com/mail/mail.html](http://francesblog.com/mail/mail.html)
 * but this is outside the blog, blog is in ‘home’ dir; so I need it here: [http://francesblog.com/home/mail.php](http://francesblog.com/home/mail.php)
 * (or anywhere else inside blog (i.e., inside ‘home’ folder.. so can have form 
   in main area then around it the same header, footer, & sidebar as other pgs in
   blog..)
 * thank you very much….
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/php-question-2-2/#post-639903)
 * Why reinvent the wheel?
    [http://wordpress.org/extend/plugins/search.php?q=contact](http://wordpress.org/extend/plugins/search.php?q=contact)
 *  Thread Starter [maya90](https://wordpress.org/support/users/maya90/)
 * (@maya90)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/php-question-2-2/#post-639919)
 * thank you very much.. that worked.. ONLY THING:
 * where/how do I tell it to what address to send email to??
 * (email add user puts in is not it, obviously…:)
 * I know how to do this, looked for relevant code, changed this
 *  $to = $_REQUEST[’email’];
 * to
 *  $to = <my address>;
 * (I mean obviously email has to be sent to me, not to email address user puts 
   in form…;)
 * but I never received email (no errors when submitted form..)
 * other thing I don’t get: this is form tag:
 * <form name=”wp_contact_form” method=”post” target=””>
 * action is not specified.. how does it know where to submit the form???
 * I also don’t get why there’s db-code in there.. I don’t need any db-functionality
   here, just email sent to me, that’s it..
 * main thing, though, even though I put my own email address in there, I never 
   received email… (when I try from my own code, from form here.. [http://francesblog.com/mail/mail.html](http://francesblog.com/mail/mail.html),
   I get email immediately…)
 * thank you…
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/php-question-2-2/#post-639932)
 * Who would know which one of the 5 plugins listed there was installed on your 
   site… ?
    Every plugin comes with readme or it has instructions on the author’s
   site. You can read them as everyone else…
 *  Thread Starter [maya90](https://wordpress.org/support/users/maya90/)
 * (@maya90)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/php-question-2-2/#post-639934)
 * I did read the readme file, as I mentioned in my last reply.. it doesn’t say 
   at all where u put what email add you want email sent to..
 * in the forums indicated in the readme file ([http://www.linksback.org/forums/wp-contact/18-contact-plugin.html](http://www.linksback.org/forums/wp-contact/18-contact-plugin.html))
   somebody asks precisely this question, and this is answer:
 * It is set to go to the default wordpress email. I will include an option to change
   that in the next version.
 * 🙂
 * but there should be a way to change this manually, which I thought I did, but
   it didn’t work.. ok.. thank you…
 *  Thread Starter [maya90](https://wordpress.org/support/users/maya90/)
 * (@maya90)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/php-question-2-2/#post-639940)
 * I’m trying to do on my own..
 * have form in sidebar I coded myself..
 * I have action=”ThankYou.php” which is in same dir as form (i.e., in root for 
   my blog (www.francesblog.com/home/), but I get a 404 on ThankYou.php; I even 
   get a 404 if I put absolute link to it in the form!! ([http://francesblog.com/home/ThankYou.php](http://francesblog.com/home/ThankYou.php))
   why is this..
 * even if I put a simple test pg in there ([http://francesblog.com/home/test.php](http://francesblog.com/home/test.php))
 * I get a 404… why?????
 * thank you..

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

The topic ‘php question…’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 2 participants
 * Last reply from: [maya90](https://wordpress.org/support/users/maya90/)
 * Last activity: [18 years, 7 months ago](https://wordpress.org/support/topic/php-question-2-2/#post-639940)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
