how to get data from form post method in wordpress?
I have make one enquiry page in wordpress, when i will pos开发者_JAVA技巧t that form then it will shows 404 error, can anyone help me please.
Set the action
attribution to point to the correct URI.
is going to sound very strange but if you put the names of the field with some kind strange words like "abc" or "xyz" at the start of any field, is going to work, something like
<input type="text" name="xyzName" id="xyzName" />
should do the trick , make sure to do this with EVERY field, even the submit input, why it works? because wordpress has some hidden fields with the same name so you crash with them, so the solution? used names that you know that is not going to cross with the one of the wordpress
pd: remember use the same name in post to get the data $_POST['xyzName']
other tip, you can use "exec-php" plugin to be able to run some "php" code inside the "pages" of wordpress
精彩评论