-
- 21 Posts
Hi,
I have the following code , that I allways use on other websites (simplified).
<?php
if ($_POST) {
echo "post ok";
} else {
?>
<form name="contact" method="post" action="">
<input type="text" name="voornaam" />
<input type="submit" name="verzenden" value="verzenden" />
</form>
<?php }
?>
This allways works, but now I use modx it doesn’t.
Anyone any idea?
-
- 5,888 Posts
Try
<?php
if (isset($_POST['verzenden'])) {
$output= "post ok";
} else {
$output='
<form name="contact" method="post" action="">
<input type="text" name="voornaam" />
<input type="submit" name="verzenden" value="verzenden" />
</form>';
}
return $output;
?>
-
- 5,888 Posts
with
isset($_POST['verzenden'])
?
-
- 21 Posts
I put the if ($_POST) code on an other page and it works now.
Very strange.
Anyway, thnx for all the help!