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.

Form To Email

Featured Replies

Hello

 

Im having trouble with a website Im working on with Dreamweaver..

 

Im an amateur web builder and Im building a site for my sister.

 

She would like me to create a form on the web page so that people can forward comments, or ask various questions to my sisters email address.

 

But how?

I have the Form created and Ive read on here that Il need a PHP Page?

 

So do I create a PHP Page and use this script: (which I always found on here)

 

 

<?php

$subject ="$subject";

$message="$detail";

$mail_from="$customer_mail";

$header="from: $name <$mail_from>";

 

// Enter your email address

$to ='someone@somewhere.com';

 

$send_contact=mail($to,$subject,$message,$header);

 

if($send_contact){ echo "We've recived your contact information"; }

else { echo "ERROR"; }

?>

 

 

If I use this script on a new PHP Page, how do I link it to my form page?

Sorry for being such a newbie but Its my first website...

 

 

Thanks for any help

Edited by Ryan777

In the html of your form at the very start of your form you will need to add an action as below

 

<form action="yourphp.php"

 

so when you press the submit button the form knows where to send the data

 

I am sure some of the php gurus will come along and tell you that the php code you have will probably generate a lot of spam, so possibly google captcha which is a code that will reduce spam

 

Pat

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.