I am trying to take an existing PHP app and port it into MODx. It’s got a very simple structure - it some PHP, HTML and some SQL calls. On it’s own it works fine and doesn’t require anything funky.
But I’m having trouble getting one of the pages to work and I think I’m just missing something very basic. The snippet code is essentially this :
<?php if (!isset($_POST['submit'])) { ?>
//output an html form
<?php
}
else {
//execute php code
}
?>
It outputs the form, but doesn’t reload on "submit" and execute the inner block of PHP.
I checked the forums and don’t see an obvious example with which to "follow the bouncing ball" and get it to work.
Can anyone point me in the right direction to using the MODx-friendly way of accomplishing this? Thanks for the patience,
Matt
PS If anyone has links to tutorials on porting existing PHP and/or HTML into MODx - other than the material at maryspad - I be interested in seeing that too.