Pakistan IT Forum (Discuss Information Technology in Pakistan)
News: Make new friends at our new Community Website ToddSpace.com Here
 
*
Hi, Guest. Welcome to IT Forum of Pakistan, Please login or register. January 07, 2009, 11:41:10 AM


Login with IT Forum's username, password and session length


Pak IT forum is launched to provide Pakistan's IT community with a platform to discuss IT related issues. These IT related discussions are proved to be useful for other Pakistani people. Information Technology in Pakistan is hottest issue on IT related forums. We hope that serious Pakistani people will join this IT Forum and will let us know about their experience in order to boast Pakistan's Software Exports.

Pages: [1]
  Print  
Author Topic: I need help with an email script  (Read 617 times)
Arhem
Newbie
*
Posts: 9


View Profile
« on: May 30, 2007, 07:08:27 PM »

can somebody help me make an email script so i can use it on a link i have..i have aim and yahoo if u want to talk to me there or jus reply...thanks
Logged
Mr.Bugz
Newbie
*
Posts: 29


xstrem_ice
View Profile WWW Email
« Reply #1 on: June 07, 2007, 08:07:09 AM »

if u mean t0 Feedback Form

feedback.php
Quote
<form action="email.php" method="post">
<!-- DO NOT change ANY of the php sections -->
<?php
$ipi = getenv("REMOTE_ADDR");
$httprefi = getenv ("HTTP_REFERER");
$httpagenti = getenv ("HTTP_USER_AGENT");
?>
<input type="hidden" name="ip" value="<?php echo $ipi ?>" />
<input type="hidden" name="httpref" value="<?php echo $httprefi ?>" />
<input type="hidden" name="httpagent" value="<?php echo $httpagenti ?>" />
<h2 align="center">Feedback Form</h2>
<p>
All input is blah blah ...... </p>
<p>Send Data to: <select name="attn" size="1">
<option value=" MT General Email ">General Email</option>
<option value=" MakeTemplate Owner ">Owner of MakeTemplate</option>
<option value=" Technical Support ">Technical Support</option>
<option value=" PHP Codemaster ">PHP Codemaster</option>
</select>
<br />
Name: <input type="text" name="nameis" size="20" /> Email:<input type="text" name="visitormail" size="20" />


<br/> Overall Rating:<br/> [<input checked="checked" name="rating" type="radio" value="good" /> Good]   [<input name="rating" type="radio" value="bad" /> Bad]   [<input name="rating" type="radio" value="ugly" /> Ugly]
</p>
<p> Request additional features for a feedback tutorial:<br />
<input type="checkbox" name="emailvalidation" value="y" /> Email 'format' Validation - check @<br />
<input type="checkbox" name="fieldvalidation" value="y" /> Required Form Field Validation.<br />
<input type="checkbox" name="htmlcontrol" value="y" /> More intergratd HTML (in form).<br />
<input type="checkbox" name="phpform" value="y" /> Improved PHP form script generator.<br />
<input type="checkbox" name="htmlform" value="y" /> A complete HTML form generator. <br />
</p>
<br />
<h3 align="center">General Comments</h3>
<p align="center">
<textarea name="feedback" rows="6" cols="30">Notes n comments here</textarea>
</p>
<hr />
<p align="center">
<input type="submit" value="Submit Feedback" />
</p>
</form>

email.php
Quote
<h3 align="center">Thanks for your Feedback </h3>
<!-- VIP: change YourEmail to your real email -->
<?php

if((!$visitormail == "") && (!strstr($visitormail,"@") || !strstr($visitormail,".")))
{
echo "<h2>Use Back - Enter valid e-mail</h2>\n";
$tellem = "<h2>Feedback was NOT submitted</h2>\n";
}

if(empty($nameis) || empty($feedback) || empty($visitormail)) {
echo "<h2>Use Back - fill in all fields</h2>\n";
}

echo $tellem;

if ($emailvalidation == "y") {
$req1 = "Email format Validation \n" ;
}

if ($fieldvalidation == "y") {
$req2 = "Required Form Field Validation \n";
}
if ($htmlcontrol == "y") {
$req3 = "More intergratd HTML (in form) \n";
}
if ($phpform == "y") {
$req4 = "Improved PHP form script generator \n";
}
if ($htmlform == "y") {
$req5 = "A complete HTML form generator \n";
}
$req = $req1 . $req2 . $req3 . $req4 . $req5;

$todayis = date("l, F j, Y, g:i a") ;

$attn = $attn;
$subject = $attn;

$feedback = stripcslashes($feedback);

$message = " $todayis [EST] \n
Attention: $attn (Rating: $rating) \n
From: $nameis ($visitormail)\n
Requested:
$req \n
Feedback: $feedback \n
Additional Info : IP = $ip \n
Browser = $httpagent \n
Referral = $httpref
";

$from = "From: $visitormail\r\n";

mail("YourEmail@website.com", $subject, $message, $from);


$screenout = str_replace("\n", "<br/>", $message);
?>


<p align="center">

<?php echo $screenout ?>

</p>
Logged

Pages: [1]
  Print  
 
Jump to:  


Powered By: comsdev Partners