We use cookies to provide you with a better experience. If you continue to use this site, we'll assume you're happy with this. Alternatively, click here to find out how to manage these cookies

hide cookie message
Contact Forum Editor

Send an email to our Forum Editor:

PLEASE NOTE: Your name is used only to let the Forum Editor know who sent the message. Both your name and email address will not be used for any other purpose.

Tech Helproom

It's free to register, to post a question or to start / join a discussion


Dreamweaver forms to email/excel


Likes # 0

I'm a web design novice, please consider this when replying.

I have a website click here with a very simple contact form using a pre made PHP script which i part customised with extra fields etc. This works fine.

First and foremeost, I want to create a second form so that potential customers could fill out measurements of their roof for me to quote on works. I have created the form in dreamweaver CS4 and it includes radio buttons and checkboxes some of which have spry validations attached to them. Upon submittal the info gets sent to my email as a postdata.att file which is readable in DW and includes all the relevant info but is a pain to see whats what as there is code around all the field entries.

Secondly as an after thought, I would use this data and input the measurements manually into an Excel worksheet that I have created that carries out calculations to give an end price. I would like to know if its possible to make a form that sends all of the customers entries into the correct areas of this worksheet to automatically work out the price.

Does anyone know of a free PHP extension or wizard that can create code for me or an extensive PHP tutorial which I can teach myself how to understand the gobble de gook.

Thanks guys

Like this post

Likes # 0

Thanks for the compliment. I think I have cracked it anyway. I used a different script:

//--------------------------Set these paramaters--------------------------

// Subject of email sent to you.
$subject = 'Results from online roof quote form';

// Your email address. This is where the form information will be sent.
$emailadd = '[email protected]';

// Where to redirect after form is processed.
$url = 'click here';

// Makes all fields required. If set to '1' no field can not be empty. If set to '0' any or all fields can be empty.
$req = '0';

// --------------------------Do not edit below this line--------------------------
$text = "Results from form:\n\n";
$space = ' ';
$line = '
foreach ($_POST as $key => $value)
if ($req == '1')
if ($value == ')
{echo "$key is empty";die;}
$j = strlen($key);
if ($j >= 20)
{echo "Name of form element $key cannot be longer than 20 characters";die;}
$j = 20 - $j;
for ($i = 1; $i <= $j; $i++)
{$space .= ' ';}
$value = str_replace('\n', "$line", $value);
$conc = "{$key}:$space{$value}$line";
$text .= $conc;
$space = ' ';
mail($emailadd, $subject, $text, 'From: '.$emailadd.');
echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';

I just created the form in DW with all the bits and bobs that I wanted, pointed it to the new PHP file I created and uploaded it to a testing server. Seems to have done the trick but have a few bits and bobs that need ironing out such as menu labels etc.

You are right about Excel. It is isn't a great deal of work to manually input the info and it would be a good idea to validate it myself. I do have a disclaimer in place stating that the quote only serves as a guide until I can carry out a proper site survey.

Thanks for your input.

Like this post

Reply to this topic

This thread has been locked.

IDG UK Sites

What is Google Photos? How to back up and share all of your photos for free

IDG UK Sites

Why I think the Apple Watch sucks and you'd be mad to buy it

IDG UK Sites

Swatch launches a colourful smartwatch

IDG UK Sites

New Apple TV 2015 release date rumours: TV streaming service delayed, hand gesture interface being...