I have an index.php and an index.xtpl file. The index.php contains all of the php code and the index.xtpl contains the html code with <!-- BEGIN: section --> blocks and {VARIABLES} destined for substitution. My problem is that when I try to put dynamic data that I pull from a MySQL table onto the form it ends up at the top of the page before .
I use the index.php file to put all of the query data for a dropdown select box into a variable and then parse the {DATA} variable that is in the index.xtpl file with the results of the query. The data always ends up on top of the page. I have also tried to put the {DATA} into a block and parse the block but get the same results.
Does anyone have any ideas?