Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I added a contact form to the footer. Apparently it works fine in the main page, but if I go to any of the categories, lets say myblog.com/category/, the contact form is looking for submit.php at myblog.com/category/submit.php. Where I should put physically submit.php in order for contact form to find it in any category page?

share|improve this question
1  
This is not a WordPress question. Please ask Wordpress specific questions here or rephrase your question. –  Brian Fegter Feb 7 '12 at 23:24
add comment

2 Answers

Just from what you described it seems as if your <form> tag looks more or less like this:

<form method='post' action='submit.php'>

Try replacing it with:

<form method='post' action='http://www.mydomain.com/submit.php'>
share|improve this answer
    
a very good point, but it did not work. The same effect. –  user385917 Feb 7 '12 at 23:32
    
How about with <form method="post" action="<?php get_bloginfo('url'); ?>/submit.php"> or <form method="post" action="<?php get_bloginfo('wpurl'); ?>/submit.php"> essentially it needs to be the exact path to the submit.php file. –  Joshua Feb 8 '12 at 0:08
    
submit.php is under mydomain.com/submit.php, so I added this "<form method='post' action='<?php get_bloginfo('url'); ?>/submit.php'>" at it still not working on pages (it works with main page). You can inspect yourself at reprezenta.us.lt (the form in the footer) –  user385917 Feb 8 '12 at 8:15
add comment

It depends where you contact form is... if (As i imagain) its in your template folder you can use this to create an absolute path to it:

<form method='post' action='<?php get_bloginfo('template_url'); ?>/submit.php'>

If you places your "submit.php" in the top folder of your hosting account you should use the same but without the "template" like so..

<form method='post' action='<?php get_bloginfo('url'); ?>/submit.php'>

.
To help you understand:

<?php get_bloginfo('template_url'); ?> = www.domain.com/wp-content/themes/yourTheme/
<?php get_bloginfo('url'); ?> = www.domain.com

.
Hope this helps. Cheers, Sagive

share|improve this answer
    
submit.php is under mydomain.com/submit.php, so I added this "<form method='post' action='<?php get_bloginfo('url'); ?>/submit.php'>" at it still not working on pages (it works with main page). You can inspect yourself at reprezenta.us.lt (the form in the footer) –  user385917 Feb 8 '12 at 8:15
    
i see.. so. your form is not a part of your wordpress theme... so it wont understand the command bloginf().. might i ask why dont you use CONTACT FORM 7 ?? –  Sagive SEO Feb 9 '12 at 0:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.