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.

Help with Contact Form

Featured Replies

Ive got a slight query im sure somebody could easily clear up for me if that's ok.

 

I know how the typical contact form works, the three files include the html page, the process.php file and usually a thank you page.

 

I know how to make a simple contact form which would include a name, email, telephone and message box, but how would I go about editing the 'process' file if I were to alter the form code to add drop down boxes and other radio button items?

 

At present here's my functioning code for a simple contact form. If I were to add extra fields to my form would I simply add a new line to the red code below like so or am I going wrong somewhere?

 

<?

 

$message .= "

 

Planners submitted Interest

------------------------------

 

Name: " . $_POST['name']. "

 

 

Company: " . $_POST['company']. "

 

 

Email Address: " . $_POST['emailaddress']. "

 

 

Telephone Number: " . $_POST['telephonenumber']. "

 

 

Message: " . $_POST['message']. "

 

 

NEW LINE GOES HERE???

 

 

";

 

 

$to = "chris-dicko@live.co.uk" ;

 

$subject = 'Planners submitted Interest';

 

 

$mailHeaders = "From: No Reply ";

$mailHeaders .= "<chris-dicko@live.co.uk>\r\n";

 

 

mail($to, $subject, $message, $mailHeaders);

 

header ("Location: thankyou.php");

exit;

 

?>

 

I generally want to add some new fields to my form such as a couple of check boxes and drop down selection boxes. Does it matter what the form field type is as long as it is called from in the function file?

 

:unsure:

simple enough....

 

here is the code for the form html page for say a drop down for how tey found your site

 

 		<label>How did you find us?</label>
		<SELECT NAME="find" SIZE="1">
		<OPTION SELECTED>n/a.
		<OPTION>Recommendation
		<OPTION>Leaflet
		<OPTION>Local Press
		<OPTION>Search Engine
		<OPTION>Other
		</SELECT>

 

then in you process.php file you need the following

 

 $find = $_POST['find'] ;

 $message = "what ever you want etc... then to add the find drop down just add Found $find and it will show the answer"

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.