Note that there are some explanatory texts on larger screens.

plurals
  1. POJoomla 2.5 404 Error When Submitting PHP Form inside an Article
    text
    copied!<p>I made my own module to submit a php form's data into the database. I have the module inside of an article now.</p> <p>When I submit the form, it goes to a 404 error page even though I have another template page for a successful submission.</p> <p>I have tried using action = post.php as well as the exact URL but it fails.</p> <p>Does anyone know what I am going wrong?</p> <p>Here is the URL: <a href="http://aubrey-joomla-test.freeiz.com/index.php/new-user-registration-form" rel="nofollow">http://aubrey-joomla-test.freeiz.com/index.php/new-user-registration-form</a></p> <p>Here is my file name for the default template: default_tmpl.php</p> <p>Here is my tmpl code:</p> <pre><code>&lt;div&gt; &lt;form action="&lt;?php echo JRoute::_('index.php'); ?&gt;" method="post" id="myform" class="cols" &gt; &lt;input type="hidden" name="form_send" value="send" /&gt; &lt;h2&gt;New User Registration Form&lt;/h2&gt; &lt;table&gt; &lt;label&gt;Are you employed?&lt;/label&gt; &lt;tr&gt; &lt;td&gt;&lt;label&gt;&lt;input type="radio" name="option" value="1" required="required"&gt;Yes&lt;/label&gt;&lt;/td&gt; &lt;td&gt;&lt;label&gt;&lt;input type="radio" name="option" value="0" required="required"&gt;No&lt;/label&gt;&lt;/td&gt; &lt;/tr&gt; &lt;label&gt;If not, please proceed to the next section.&lt;/label&gt; &lt;/table&gt; &lt;fieldset name="salary"&gt; &lt;h4&gt;Income From Employment&lt;/h4&gt; &lt;table&gt; &lt;tr&gt;&lt;label&gt;Pay cycle:&lt;/label&gt; &lt;td&gt;&lt;label&gt;&lt;input type="radio" name="option1" value="1" required="required"&gt;Monthly&lt;/label&gt;&lt;/td&gt; &lt;td&gt;&lt;label&gt;&lt;input type="radio" name="option1" value="2" required="required"&gt;Biweekly&lt;/label&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;p&gt;&lt;label&gt;Please enter your typical pay: &lt;input type="text" name="amountpay" required="required" pattern="\d+(\.\d{2})?"/&gt; &lt;/label&gt;&lt;/p&gt; &lt;p&gt;&lt;label&gt;Please select your next pay day: &lt;input type="date" name="paydate" required="required" /&gt; &lt;/label&gt;&lt;/p&gt; &lt;/fieldset&gt; &lt;fieldset name="fixeditems"&gt; &lt;h4&gt;Fixed Items&lt;/h4&gt; &lt;table&gt; &lt;label&gt;Payment cycle:&lt;/label&gt; &lt;tr&gt; &lt;td&gt;&lt;label&gt;&lt;input type="radio" name="option2" value="1" required="required"&gt;Monthly&lt;/label&gt;&lt;/td&gt; &lt;td&gt;&lt;label&gt;&lt;input type="radio" name="option2" value="2" required="required"&gt;Biweekly&lt;/label&gt;&lt;/td&gt; &lt;tr&gt; &lt;/table&gt; &lt;table&gt; &lt;label&gt;Is this a form of:&lt;/label&gt; &lt;tr&gt; &lt;td&gt;&lt;label&gt;&lt;input type="radio" name="option3" value="2" required="required"&gt;Income&lt;/label&gt;&lt;/td&gt; &lt;td&gt;&lt;label&gt;&lt;input type="radio" name="option3" value="1" required="required"&gt;Expense&lt;/label&gt;&lt;/td&gt; &lt;tr&gt; &lt;/table&gt; &lt;p&gt;&lt;label&gt;Please enter the typical amount: &lt;input type="text" name="amount" required="required" pattern ="\d+(\.\d{2})?" /&gt; &lt;/label&gt;&lt;/p&gt; &lt;p&gt;&lt;label&gt;Please select the next due date: &lt;input type="date" name="amountdate" required="required" /&gt; &lt;/label&gt;&lt;/p&gt; &lt;/fieldset&gt; &lt;hr&gt; &lt;div class="clear"&gt;&lt;/div&gt; &lt;button type="submit" name="send" value="Send"&gt;Submit form&lt;/button&gt; &lt;button type="reset"&gt;Reset&lt;/button&gt; &lt;/form&gt; &lt;/div&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload