/    Sign up×
Community /Pin to ProfileBookmark

Need help with moving from FP (finally) to parts unknown….

my company has had a website built via frontpage since, well, the beginning of FP. 97 to be exact. last week our hosting company informed me that the will no longer be supplying FP extensions.

what i am trying to do is to keep the website as is but strip away all the FP coding and ending up with a strictly HTML site.

the site relies on two functions available in FP – page insertion (ie, the ability to insert a page into multiple other pages) and form generation. the page insertion can be easily addressed. i can manually copy and paste the necessary page. The form, however, is eluding me. creating a form per se is no problem. what i can’t figure out is how to get the data from the form into an email message to me behind the scenes.

as an example, the following will ask for data and mail it to me by using the client’s own email system:

<html>
<body>
<h2>Test Form</h2>
<form action=”MAILTO:[email protected]” method=”post” enctype=”text/plain”>
Name:<br>
<input type=”text” name=”name” value=”your name”><br>
E-mail:<br>
<input type=”text” name=”mail” value=”your email”><br>
Comment:<br>
<input type=”text” name=”comment” value=”your comment” size=”50″><br><br>
<input type=”submit” value=”Send”>
<input type=”reset” value=”Reset”>
</form>
</body>
</html>

i’m not real happy with this. the old form in the fp website did this mailing behind the scenes.

i’ve googled how to do this but they all focus on creating the form itself and pretty much ignore the final step of doing something with the data the form gathered.

i DID find the following on one site:

“Let’s have a quick look at some main aspects of it. The <form> tag should have 2 additional attributes:

action=”contact.php” – this attribute specifies where to send the data from the contact form fields, when it has been submitted

method=”post” – this attribute specifies how to send data from the form to the file specified in the action attribute”

it supplied the contents of the file “contact.php” which is as follows:

<?php
$field_name = $_POST[‘cf_name’];
$field_email = $_
POST[‘cf_email’];
$field_message = $_POST[‘cf_message’];

$mail_to = ‘[email protected]‘;
$subject = ‘Message from a site visitor ‘.$field_name;

$body_message = ‘From: ‘.$field_name.”n”;
$body_message .= ‘E-mail: ‘.$field_email.”n”;
$body_message .= ‘Message: ‘.$field_message;

$headers = ‘From: ‘.$field_email.”rn”;
$headers .= ‘Reply-To: ‘.$field_email.”rn”;

$mail_status = mail($mail_to, $subject, $body_message, $headers);

if ($mail_status) { ?>
<script language=”javascript” type=”text/javascript”>
alert(‘Thank you for the message. We will contact you shortly.’);
window.location = ‘contact_page.html’;
</script>
<?php
}
else { ?>
<script language=”javascript” type=”text/javascript”>
alert(‘Message failed. Please, send an email to [email][email protected][/email]‘);
window.location = ‘contact_page.html’;
</script>
<?php
}
?>


———————————————————-

my question is …. how do i connect these two?

please know that i’m not a coder. just the office manager at a small business. i do have some programming background from waaaaaaaaaaay back (cobol, fortran, basic) but nothing current.

thanks in advance,

terry

to post a comment
HTML

1 Comments(s)

Copy linkTweet thisAlerts:
@TerryZauthorSep 28.2015 — attn moderator: this thread can be deleted. terryz.
×

Success!

Help @TerryZ spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...