I need a script or something for an e-mail form so you can e-mail directly on the site with out giving out your e-mail
Printable View
I need a script or something for an e-mail form so you can e-mail directly on the site with out giving out your e-mail
got anything in javascript?
Why do you want a php alternative? :huh:
I use php for a mail form ... works great and is secure :)
Javascript is not a serverside language like php. You can use javascript to scramble your email adress and send the mail through default email application if you want.
But php,cgi is the way to go.
Even if you want to use JS along with action="mailto:", the sender will know your address.
Webhosting don't allow php i don't think but for sure not cgi
and I dunno how to use those kinda scripts
Most of those scripts come with manuals. :)
they do?
Yes, they do. :P
it's still confusing
What exactly is confusing, maybe we could help you? :)Quote:
Originally posted by Keikan@1 February 2004 - 07:06
it's still confusing
Everything I don't even know how to get started after I download the script
Which script are you using? Just attach it here.
the php one posted up there
In the document with the form, you must have this:Then, upload the following file to the same directory as form2mail.php after editing everything:Code:<form method="post" action="form2mail.php">
Set permissions to --rwxr-xr-x and you're good to go.Code:<?php
// Script by George A. & Calin S. from Web4Future.com. Modified slightly by haxor41789 for standards compliance.
// EDIT THE FOLLOWING VARIABLES
$MailToAddress = "[email protected]"; // This is your email address. Use ", " to seperate multiple addresses.
$redirectURL = "http://www.web4future.com/thankyou.htm"; // The URL of the thank you page.
$MailSubject = "[Message from the contact form]"; // The subject of the message you will receive
$MailToCC = ""; // Also sends the email to this address (leave empty if you don't use it)
// DO NOT EDIT BELOW THIS LINE
$Message = "";
if (!is_array($HTTP_POST_VARS))
return;
reset($HTTP_POST_VARS);
while(list($key, $val) = each($HTTP_POST_VARS)) {
$GLOBALS[$key] = $val;
if (is_array($val)) {
$Message .= "<strong>$key:</strong> ";
foreach ($val as $vala) {
$vala =stripslashes($vala);
$Message .= "$vala, ";
}
$Message .= "<br />";
}
else {
$val = stripslashes($val);
if (($key == "Submit") || ($key == "submit")) { }
else { if ($val == "") { $Message .= "$key: - <br>"; }
else { $Message .= "<strong>$key:</strong> $val<br>"; }
}
}
}
$Message = "<span style=\"font-face:verdana;font-size:12px;\">".$Message."</span>";
mail( $MailToAddress, $MailSubject, $Message, "Content-Type: text/html; charset=ISO-8859-1\r\nFrom: ".$email."\r\nBCc: ".$MailToCC);
header("Location: ".$redirectURL);
?>
Hope this helps. :)
uhhh........
If you have SmartFTP or somthing equivalent, in the command prompt you can type:orQuote:
CHMOD --rwxr-xr-x form2mail.php
Quote:
CHMOD 700 form2mail.php
I think he's on a shaw members site. No php, no cgi, front page enabled but extremely limited, no asp.
That just blows.
You could use <form method="post" action="mailto:[your]@[email].[address]?subject=[subject]">, but this requires that the user have an email client installed.