after send i get this:
Code: Select all
Warning: html_entity_decode() expects at most 3 parameters, 5 given in /home/XXXXXX/public_html/demo1/catalog/controller/information/contact2.php on line 23Error: E-Mail message required!
Code: Select all
Warning: html_entity_decode() expects at most 3 parameters, 5 given in /home/XXXXXX/public_html/demo1/catalog/controller/information/contact2.php on line 23Error: E-Mail message required!
ALL Templates :: 1.5.1+ Templates :: 50%-75% PRICE DROP ONLY at OpencartStuff.com
5 what? It's parameters for a functionMaansy wrote:i edited the contact us form. i added more fields to be emailed.
after send i get this:expects at most 3 parameters, how can i set it to 5 or more?Code: Select all
Warning: html_entity_decode() expects at most 3 parameters, 5 given in /home/XXXXXX/public_html/demo1/catalog/controller/information/contact2.php on line 23Error: E-Mail message required!
Code: Select all
$mail->setText(strip_tags(html_entity_decode($this->request->post['website'], ENT_QUOTES, 'UTF-8')));
$mail->setText(strip_tags(html_entity_decode($this->request->post['job'], ENT_QUOTES, 'UTF-8')));
$mail->setText(strip_tags(html_entity_decode($this->request->post['date'], ENT_QUOTES, 'UTF-8')));
$mail->setText(strip_tags(html_entity_decode($this->request->post['enquiry'], ENT_QUOTES, 'UTF-8')));
Code: Select all
$mail->setText(strip_tags(html_entity_decode($this->request->post['enquiry'], ENT_QUOTES, 'UTF-8')));
ALL Templates :: 1.5.1+ Templates :: 50%-75% PRICE DROP ONLY at OpencartStuff.com
Code: Select all
$msg = strip_tags(html_entity_decode($this->request->post['website'], ENT_QUOTES, 'UTF-8')) . "\r\n";
$msg .= strip_tags(html_entity_decode($this->request->post['job'], ENT_QUOTES, 'UTF-8')) . "\r\n";
$msg .= strip_tags(html_entity_decode($this->request->post['date'], ENT_QUOTES, 'UTF-8')) . "\r\n";
$msg .= strip_tags(html_entity_decode($this->request->post['enquiry'], ENT_QUOTES, 'UTF-8')) . "\r\n";
$mail->setText($msg);
ALL Templates :: 1.5.1+ Templates :: 50%-75% PRICE DROP ONLY at OpencartStuff.com
I didn't say to use .= for the first one.. so don't.Maansy wrote:thanks Q for replying.
i tried your code but nothing gets send.
so i tried:
1st line: $msg =
changed it to: $msg .=
i got an error.
thanks for trying to help Q
i was only tryingQphoria wrote: I didn't say to use .= for the first one.. so don't.
The code above isn't finished. I was only correcting your example. You still need to add the rest of the mail stuff like mail->send()
Code: Select all
if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
$mail = new Mail();
$mail->protocol = $this->config->get('config_mail_protocol');
$mail->parameter = $this->config->get('config_mail_parameter');
$mail->hostname = $this->config->get('config_smtp_host');
$mail->username = $this->config->get('config_smtp_username');
$mail->password = $this->config->get('config_smtp_password');
$mail->port = $this->config->get('config_smtp_port');
$mail->timeout = $this->config->get('config_smtp_timeout');
$mail->setTo($this->config->get('config_email'));
$mail->setFrom($this->request->post['email']);
$mail->setSender($this->request->post['name']);
$mail->setSubject(sprintf($this->language->get('email_subject'), $this->request->post['name']));
$msg = strip_tags(html_entity_decode($this->request->post['website'], ENT_QUOTES, 'UTF-8')) . "\r\n";
$msg = strip_tags(html_entity_decode($this->request->post['job'], ENT_QUOTES, 'UTF-8')) . "\r\n";
$msg = strip_tags(html_entity_decode($this->request->post['date'], ENT_QUOTES, 'UTF-8')) . "\r\n";
$msg = strip_tags(html_entity_decode($this->request->post['enquiry'], ENT_QUOTES, 'UTF-8')) . "\r\n";
$mail->setText($msg);
ALL Templates :: 1.5.1+ Templates :: 50%-75% PRICE DROP ONLY at OpencartStuff.com
Code: Select all
$msg = strip_tags(html_entity_decode($this->request->post['enquiry'], ENT_QUOTES, 'UTF-8')) . "\r\n";
ALL Templates :: 1.5.1+ Templates :: 50%-75% PRICE DROP ONLY at OpencartStuff.com
ALL Templates :: 1.5.1+ Templates :: 50%-75% PRICE DROP ONLY at OpencartStuff.com
Code: Select all
<input type="file" name="upload" />
Code: Select all
if (is_uploaded_file($this->request->files['upload']['tmp_name'])) {
$mail->attachment(file_get_contents($this->request->files['upload']['tmp_name']));
}
Code: Select all
[b]Notice[/b]: Undefined index: cb_logo in /home/xxxxx/public_html/demo1/catalog/controller/information/contact4.php on line 40
[b]Warning[/b]: Cannot modify header information - headers already sent by (output started at /home/xxxxx/public_html/demo1/index.php:92) in /home/xxxxx/public_html/demo1/system/engine/controller.php on line 27
Code: Select all
[b]Fatal error[/b]: Call to undefined method Mail::attachment() in /home/xxxxx/public_html/demo1/catalog/controller/information/contact4.php on line 25
ALL Templates :: 1.5.1+ Templates :: 50%-75% PRICE DROP ONLY at OpencartStuff.com
ALL Templates :: 1.5.1+ Templates :: 50%-75% PRICE DROP ONLY at OpencartStuff.com
ALL Templates :: 1.5.1+ Templates :: 50%-75% PRICE DROP ONLY at OpencartStuff.com
No more using Apsona, as they are not updated.
Users browsing this forum: Google [Bot] and 373 guests