Reading a form in wordpress with the plugin Exec-PHP
9
We are using the Exec-PHP to use PHP in our wordpress page. But we got a problem, we cant read from a textfield form. Is this a Exec-PHP limmitation (If so could anyone recommend a plugin who does allow this) Or is something wrong in our code?
This is our code:
<form action="" method="post">
<input type="text" value="voornaam" />
<input type="submit" value="Verzend" />
<input type="hidden" name="button_pressed" value="1" />
<?php
if(isset($_POST['button_pressed']))
{
echo $_POST["voornaam"];
echo 'Done';
}
?>
Answer
Solution:
You should add:
Then, in your PHP, you can use:
Your form: