Log in

View Full Version : I need to insert text boxes with directing email



joaoleitao
08-03-2006, 06:12 PM
greetings,

i need to have a code to make a simple reservation box to insert on many of my sites.

i want the page extension to be .htm or .html, no .php.

i can create the boxes and fill text boxes, submit buttons, of course, but my problem is in where to insert my email, i mean, where to insert the email where the messages will go to? This seems quite simple but i have checked other tuturials and nothing... maybe is too basic.... hehe

thank you

blm126
08-03-2006, 06:18 PM
You have to use a server side language(like php). Do you have a specific reason not to use php?

joaoleitao
08-03-2006, 06:27 PM
hello, thank you.
hehe, i have no reason why not using php. i just dont have any idea what it is. im even scared of it! ;o)

i took from another forum posting this code to make it:

<html>
<head>
</head>
<body>
<form action="mail.php" method="POST">
Name: <input type="text" name="name" id="name">
Email: <input type="text" name="mail" id="mail">
Subject: <input type="text" name="subject" id="subject">
Comments: <textarea name="comment" id="comment">Suggestions/comments here</textarea>
</form>
</body>
</html>

my problem is in where to insert this next code? is it in the header?

<?php
$to = "your@email.here"
$from = $_POST["mail"];
$name = $_POST["name"];
$message = $_POST["comment"];
$subject = $_POST["subject"];
if(mail($to, $subject, $message, 'From: <'.$name.'>'.$from)){
echo "Mail ($subject), was successfully sent.";
} else {
echo "The email ($subject) could not be sent.";
}
?>

as i have a few pages already with .html and they are already in search engines, i wouldn't like to change the pages extensions.

do you think making a small pop up only with the reservation comment box is a good idea? will it be blocked by pop up blockers?

thank you.

mwinter
08-03-2006, 06:59 PM
You have to use a server side language(like php). Do you have a specific reason not to use php?
The mailing action needs to be performed server-side, certainly, but the OP doesn't need direct access to server-side programming features.

Look for form processing services. Your host might even provide its own. If not, there are several free services (http://www.google.co.uk/search?q=free+remotely+hosted+form+processing+%7C+%7Eprocessor) available on the Web.

Mike

joaoleitao
08-03-2006, 07:08 PM
thank you for your help.

im using bluehost.

what do you mean by "Look for form processing services". i am sorry for my ignorance, but i would like to have my problem solved.

mwinter
08-03-2006, 07:26 PM
im using bluehost.There are at least two BlueHost companies with different top-level domains (.com and .org, in this case). Both seem to offer the feature. BlueHost.com calls it "Form-mail Scripts" and BlueHost.org calls it "Form-to-mail". You'll either need to look at the user documentation for these providers, or ask their support staff how to use the services.


what do you mean by "Look for form processing services".Pretty much what I wrote. :p The generic term for a script that takes user input from a form and does something with it (particularly e-mailing the data to someone) is called a form processor. As that's what you seem to want, I suggested that you look for one. :)

The link I included in my previous post is a set of Google search results to providers and repositories that host this sort of script.

Good luck,
Mike

joaoleitao
08-03-2006, 07:43 PM
thank you sir.

joaoleitao
08-03-2006, 07:57 PM
hello again.
thank you for your help.

do you think i can use a flash reservation box on the website. this way i do have to change the page to php nor being worried about other relavant webdeveloping theory i have no experience with.

do you think the flash reservation box is a good idea? where can i get a easy flash tutorial on a reservation box please?

thank you again