[wp-hackers] Embedding forms in Wordpress

Brian Groce wp at watershedstudio.com
Mon Nov 27 05:17:28 GMT 2006


I think that I'm running into a similar problem and was wondering if 
someone could point me in the right direction...

I'm writing a form based plugin which outputs the form like so:
> $form  = "<form action='";
> $form .=    get_permalink();
> $form .= "' method='post'>";
> $form .= "<input type='text' name='my_name' />";
> $form .= "<input type='radio' name='my_action' value='one' />";
> $form .= "<input type='radio' name='my_action' value='two' />";
> $form .= "<input type='submit' name='submit_form' value='submit it' />";
> $form .= "</form>";
If I have the permalink rewrite option turned off, I am able to return 
all of the variables in any of the normal ways (and they all show up 
when using print_r( $_POST ); to display the array).  But when I turn on 
the permalink rewrite option all of the variables disappear.

If anyone has some ideas as to what might be going on, please let me know.

Thanks,

Brian



André Schieleit said the following on 11/12/2006 3:40 PM:
>> Robin's suggestion is excellent, you really should reference posted 
>> form fields using the $_POST['elementname'] syntax.
> Thanks for the advice. I changed it to this.
>
>   André


More information about the wp-hackers mailing list