Post a form and index.php
Posted: Mon Oct 15, 2007 9:10 pm
Hey all, I have a question for you. I haven't coded in Joomla for a long time and I am trying to get my coding fingers back. This sould be an easy one for you. Lets say that I want to create a form and post back to the same page like this.
(This is an example I just wrote, not sure if it will really work)
when I press submit I get the webserver root and index.php. How can I submit a form to the same php page?
Thanks,
timgerr
Code: Select all
<body>
<form name="submitThis" id="topForm" action="<?php $mosConfig_live_site ?>/index.php?option=com_backendform" type="post">method="post">
<input type="test" id="test"></input>
<input type="submit>Press Me</input>
<?php
$p1 = JRequest::getVar( 'test','', 'post' );
echo $p1;
</php>
(This is an example I just wrote, not sure if it will really work)
when I press submit I get the webserver root and index.php. How can I submit a form to the same php page?
Thanks,
timgerr