Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

PHP Contact Form

Featured Replies

Hi guys,

 

I recently had a website I designed coded for me which included a basic contact form which I cant seem to get to work!

 

Can anyone shed any light on what I need to change in order to get it working?

 

Please see attached files.....

 

The email ad I want all the messages going to is quotes@geminimanufacturing.co.uk

 

Please also see a link to the website in question...www.geminimanufacturing.co.uk

 

(form is on the contact page)

 

Any help would be much appreciated!!

class.phpmailer-lite.php

submit.php

Just to make sure you've got the basics right is your sever or localhost running PHP 5 or over?

 

if (version_compare(PHP_VERSION, '5.0.0', '<') ) exit("Sorry, this version of PHPMailer will only run on PHP version 5 or greater!\n");

 

Otherwise it won't work.

 

 /**
* Sets the From email address for the message.
* @var string
*/
  public $From = 'root@localhost';

  /**
* Sets the From name of the message.
* @var string
*/
  public $FromName = 'Root User';

  /**
* Sets the Sender email (Return-Path) of the message. If not empty,
* will be sent via -f to sendmail
* @var string
*/
  public $Sender = '';

  /**
* Sets the Subject of the message.
* @var string
*/
  public $Subject = '';

  /**
* Sets the Body of the message. This can be either an HTML or text body.
* If HTML then run IsHTML(true).
* @var string
*/
  public $Body = '';

  /**
* Sets the text-only body of the message. This automatically sets the
* email to multipart/alternative. This body can be read by mail
* clients that do not have HTML email capability such as mutt. Clients
* that can read HTML will view the normal Body.
* @var string
*/
  public $AltBody = '';

  /**
* Sets word wrapping on the body of the message to a given number of
* characters.
* @var int
*/
  public $WordWrap = 0;

  /**
* Method to send mail: ("mail", or "sendmail").
* @var string
*/
  public $Mailer = 'sendmail';

There are also some stuff you would need to change in the class.phpmailer-lite.php document for example the path that leads to the sendmail file and more... if you read down through the actual php document it has what you should need to change in comments.

 

/* Just had a quick look the html on the contact page and there is no action set on the form -

<form action="#" id="form" method="POST">

 

Set the action to go to the submit.php form.

 

There is also an error on the site on the index4.html where $ is not defined

This has to do with the form if my knowledge is correct so you might need to get this sorted out a swell.

Edited by JRP

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.