Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Ok, try this...</p> <p>your template file should be this:</p> <pre><code>&lt;!doctype html&gt; &lt;div style="width: 723px;"&gt; &lt;form action="&lt;?php echo $action; ?&gt;" method="post"&gt; Your name: &lt;input type="text" name="your_name"&gt;&lt;br&gt; Your e-mail: &lt;input type="text" name="email"&gt;&lt;br&gt; &lt;input type="submit" value="Order"&gt; &lt;/form&gt; &lt;/div&gt; </code></pre> <p>This has just been changed to english....</p> <p>Your controller file should be this (I have changed some of it to english)</p> <pre><code>&lt;?php class ControllerCommonOrderForm extends Controller { public function index() { $this-&gt;document-&gt;setTitle($this-&gt;config-&gt;get('config_title')); $this-&gt;document-&gt;setDescription($this-&gt;config-&gt;get('config_meta_description')); $this-&gt;data['action'] = $this-&gt;url-&gt;link('common/orderForm'); $this-&gt;data['heading_title'] = $this-&gt;config-&gt;get('config_title'); if (file_exists(DIR_TEMPLATE . $this-&gt;config-&gt;get('config_template') . '/template/common/orderForm.tpl')) { $this-&gt;template = $this-&gt;config-&gt;get('config_template') . '/template/common/orderForm.tpl'; } else { $this-&gt;template = 'default/template/common/orderForm.tpl'; } $this-&gt;children = array( 'common/column_left', 'common/column_right', 'common/content_top', 'common/content_bottom', 'common/footer', 'common/header' ); $this-&gt;response-&gt;setOutput($this-&gt;render()); /* Check if form has been submitted */ if( isset($_POST['your_name']) ) { /* Input data check */ $your_name = htmlspecialchars($_POST["your_name"]); echo $your_name; $email = htmlspecialchars($_POST["email"]); /* Set the e-mail recipient */ $myemail = "the.eolithic@gmail.com"; /* Create a new variable by assigning a value to it */ $message_to_myemail = "Hello! Your contact form has been sent a message! Sender's name: $your_name E-mail: $email end"; /* Send a message using the mail () function */ $from = "From: $your_name &lt;$email&gt; \r\n Reply-To: $email \r\n"; mail($myemail, $message_to_myemail, $from); ?&gt; &lt;p&gt;Your message has been successfully sent!&lt;/p&gt; &lt;p&gt;At &lt;a href="index.php"&gt;Home &gt;&gt;&gt;&lt;/a&gt;&lt;/p&gt; &lt;?php /* If you are filling out the form mistakes were made work the following code: */ function check_input($data, $problem = "") { $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data); if ($problem &amp;&amp; strlen($data) == 0) { show_error($problem); } return $data; } function show_error($myError) { ?&gt; &lt;html&gt; &lt;body&gt; &lt;p&gt;Please correct the following error:&lt;/p&gt; &lt;?php echo $myError; ?&gt; &lt;/body&gt; &lt;/html&gt; &lt;?php exit(); } } } } ?&gt; </code></pre> <p>Let me know if that helps...</p>
 

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