tags:

views:

29

answers:

1

I wasn't sure how to word this question, so i'll just explain.

I want my form at www.blog.com/got-a-question/ to be sent to a verify.php however when I do it sends it to a non-existent www.blog.com/got-a-question/verify.php

Where and how exactly do I direct to the verify page?

+4  A: 

This isn't about the permalink structure of WordPress; all you need to do is add a slash to the action attribute in the form

so instead of

<form action="verify.php" method="post">

do

<form action="/verify.php" method="post">

Note the slash before verify.php; that signals to the browser to post it at the root directory (blog.com/verify.php) instead of on top of the last directory.

(The permalink structure is only relevant to the extent that the lack of a file suffix confuses the browser into thinking got-a-question is a folder rather than a file, so it tries to stack on top of it.)

yc
the verify.php lies in the same theme folder as the gotaquestion.php file in the theme folder
Adam
i'll just add the whole path wp-content/themes/showtimev1.5_thisone/verify.php ... I just though there would be a more elegant way of doing this without showing the whole path.
Adam
Ah, you can use a WordPress function for the theme directory: `get_bloginfo( 'template_directory')`. But, yes, this is an annoying facet of the nature of WordPress's file structure.
yc
@Adam didn't see your first comment. /wp-content/themes/showtimev1.5_thisone/gotaquestion.php and /got-a-question aren't related to eachother as far as the browser can tell, even if the latter is just an include of the former.
yc