Im having form issues.
I started off with this
<FORM ACTION="mailto:xXx_Eternity_xXx@hotmail.com" enctype="text/plain" METHOD="post">
<input type="hidden" name="To" value="your subject for email">
<TEXTAREA NAME="COMMENTS" ROWS="6" COLS="50" ></TEXTAREA>
<INPUT TYPE="SUBMIT" VALUE="Press Me!" NAME="OK">
<INPUT TYPE="RESET" VALUE="Clear" NAME="CANCEL">
</FORM>
and then realised that a.) if users dont have mail programmes configured they have problems, and b.) it doesnt seem to work from this computer atall- ya click submit and, it brings up a blank new email for ya to type in. Dunno why that is?
Anyone any ideas
Im told ya can do this through your cgi bin, but I dunno how, someone point me to a decent tutorial? Or explain it to me? Please? I'lll give ya a cookie...
form
I took what you had and put in PHP to get it to send
just fill in xxxx@xxx.com to where you want it to go I put //Replace to whewe you need to change
and then name it with .php file ext
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<p> </p>
<p> </p>
<p><?php
if ($submit) {
if (!$comments)
{
$error = "<br> <h2>Sorry! leave a message!</h2><br>\n";
}
else {
mail("xxxxxxx@xxxxxx.com", // Replace
"needs Form -xxxxxxx@xxxxxx.com ", //Replace
"
form1 Form -
xxxxxxx.com //Replace
Comment message:
$comments
",
"From: xxxxxxx@xxxxxx.com \nReply-To: //Replace
xxxxxxx@xxxxxx.com \n"); //Replace
echo "<br><br><br><br>
<b>Thank you for telling us your Concerns and needs, $textfield!<br> We will reply to it asap.</b>
<br><br><br>\n";
}
}
if (!$submit || $error) {
echo $error;
// display form
?>
<table width="99%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><font size="2"> </font></td>
</tr>
<tr>
<td height="391" valign="top">
<form action="<?php echo
$PHP_SELF ?>" method="post" name="myForm" id="myForm">
<p align="center"><font size="2"><br />
</font></p>
<p align="center"> <font size="2"><b><br />
</b>
<textarea name="comments" rows="5" cols="50"></textarea>
</font></p>
<div align="center"> </div>
<p align="center"> <font size="2">
<input name="submit"
type="submit" value="Press Me!" />
<input type="reset" name="Reset" value="Clear" />
<!-- END FORM CODE -->
<?php
} // end if
?>
</font></p>
</form></td>
</tr>
</table>
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Bookmarks