GetDotted Domains

Viewing Thread:
"Dreamweaver Form Pages"

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Thu 14/03/02 at 21:14
Regular
Posts: 787
Ok, in the new revision of the site I'm designing, i need a frames page. I can't be bothered writing it all out in HTML (what? i'm lazy, cant help it..).

So, on Rob's recommendation, I dug out my copy of dreamweaver and made my table, now, I want the results to be sent out to an e-mail address, could someone tell me what I need to do now?
Sat 16/03/02 at 02:11
Regular
"How Handy."
Posts: 2,631
And then I edited it and came up with this:


if ($interest_corporatecommunications == "checkbox") {
$interest_corporate = "Interested in Corporate Communications";
};

if ($interest_tvprogramme == "checkbox") {
$interest_tv = "Interested in TV Programme Production";
};

if ($interest_webclips == "checkbox") {
$interest_web = "Interested in Web Clips";
};

if ($interest_memories == "checkbox") {
$interest_memory = "Interested in Memories Are Made Of This";
};

if ($interest_memories == "checkbox") {
$interest_memory = "Interested in Memories Are Made Of This";
};

if ($interest_training == "checkbox") {
$interest_train = "Interested in Training Videos";
};

if ($interest_charity == "checkbox") {
$interest_charities = "Interested in Charity Services";
};

if ($interest_consultation == "checkbox") {
$interest_consultations = "Interested in Consultation";
};

if ($interest_websites == "checkbox") {
$interest_webs = "Interested in Web Sites!";
};

if ($email == "") {
$errors .= "Sorry, you have not given an E-mail address
";
}
if ($name == "") {
$errors .= "Sorry, you have not given your name";
}

if ($errors) {
echo "Sorry, there were some errors with your submittal:

$errors

Please press the back button on your browser and correct these mistakes";
} else {


$recip = "[email protected]";
$from = $email;
$subject = "Form Results";

$body = "Form results:
Name = $name
Position = $position
Department = $department
Company = $company
Address = $address
City = $city
Post Code = $postcode
Telephone = $telephone
E-Mail = $email
Comments = $comments
Interest =
$interest_corporate
$interest_tv
$interest_web
$interest_memory
$interest_train
$interest_charities
$interest_consultations
$interest_webs";

if (mail ($recip, $subject, $body, "From: $from")) {
echo "";

} else {
echo "There was an error, an E-mail has been sent to the system administrator and it will be corrected shortly. We appologise for any inconvienience (sp?)";

mail ($recip, "The mail script f*cked up", "Details:\n\n$body", "From: $from");

}
}

?>

But the Javascript bit doesnt work..
Sat 16/03/02 at 00:18
Regular
"Eff, you see, kay?"
Posts: 14,156
And what we came up with was:


if ($email == "") {
$errors .= "Sorry, you have not given an E-mail address
";
}
if ($name == "") {
$errors .= "Sorry, you have not given your name";
}

// OK, you get the idea, one for each of the required positions. You can do
// this later

if ($errors) {
echo "Sorry, there were some errors with your submittal:

$errors

Please press the back button on your browser and correct these mistakes";
} else {


$recip = "[email protected]"; // oi, type your email here
$from = $email; // Actually... what's teh variable that holds the sender's E-mail address?
$subject = "Form Results";

$body = "Form results:
Name = $name
Position = $position
Department = $department
Company = $company
Address = $address
City = $city
Post Code = $postcode
Telephone = $telephone
E-Mail = $email
Comments = $comments
Interest = $interest_corporatecommunications
$interest_tvprogramme
$interest_webclips
$interest_memories
$interest_training
$interest_charity
$interest_consultation
$interest_websites";

if (mail ($recip, $subject, $body, "From: $from")) {
echo "Thank you, your submittal was recieved with thanks";
} else {
echo "There was an error, an E-mail has been sent to the system administrator and it will be corrected shortly. We appologise for any inconvienience (sp?)";

mail ($recip, "The mail script ****** up", "Details:\n\n$body", "From: $from");

}
}

?>

There you go. It may need some adjusting but it'll be an experience for you.
There'll almost certainly be some errors though, have fun!

(go)errors, that mean your **** then?? :)

what does /n mean?

\n (backslash) it means "newline". It's the same as a carriage return. They're
a bit quirky though, you may have to replace them with real carriage returns.
Don't worry, the function will work OK, it just looks ***** :)

heh, k. What do I have to do to the form to make it work with this?



ok, cheers. chuck us an URl for this and I'll have a play.

Ahm watch this!


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

And then I proceeeded to do some technical wizardy and copied it to Andi's webspace. Job well done!
Thu 14/03/02 at 23:22
Regular
"Eff, you see, kay?"
Posts: 14,156
I can explain all on IRC, and the good news is that the PHP method is by far the easiest you will ever come across. Even easier than using as formailer, I promise.
Thu 14/03/02 at 22:03
Regular
"Is'not Dave... sorr"
Posts: 531
Well, ideally you want to attach the form to a CGI script. That'll process the data and send it to whatever email address you specify.

The best thing for you to do is go and look at HOTSCRIPTS.COM under PERL (that's basically CGI) for files that process forms.

You should be able to find a free file with some good documentation on how to set it up.

It's not that difficult, and all it really involves is setting the URL of where that script is stored on your server.

You'll also need to change a few things within the script (unless you find a nice straight forward one) but it's all very very simple.

The help pages on this site (for freeola users) help explain the details of using CGI scripts on freeola, but you may need to find similar details from your own provider if your not with freeola.
Thu 14/03/02 at 21:14
Regular
"How Handy."
Posts: 2,631
Ok, in the new revision of the site I'm designing, i need a frames page. I can't be bothered writing it all out in HTML (what? i'm lazy, cant help it..).

So, on Rob's recommendation, I dug out my copy of dreamweaver and made my table, now, I want the results to be sent out to an e-mail address, could someone tell me what I need to do now?

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Easy and free service!
I think it's fab that you provide an easy-to-follow service, and even better that it's free...!
Cerrie
I've been with Freeola for 14 years...
I've been with Freeola for 14 years now, and in that time you have proven time and time again to be a top-ranking internet service provider and unbeatable hosting service. Thank you.
Anthony

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.