Go Back   Webmaster Forum > Development > Programming > PHP
REMOVE the ads below !
Reply
 
LinkBack Thread Tools
  # 1 (permalink)
Old
Junior Geek
Posts: 94
Join Date: Dec 2007
iTrader: (0)
Location: Romania, Pitesti
[Problem] SEND - 12-21-2007

I have create a page Contact with fields Name, Age, Adress etc...and i don't know the code of file send.php ... please can i help me anyone ? can give me the code ?
Reply With Quote
  # 2 (permalink)
Old
Super Moderator
Posts: 407
Join Date: Nov 2007
iTrader: (0)
Location: Karachi
Re: [Problem]SEND - 12-22-2007

You can use a Simple Form for that.

For HTML


Code:
form 
  action="mailto:dummy1@chamisplace.com"
  method="POST"
  enctype="multipart/form-data"
  name="EmailTestForm">

Your Name:<br>
<input type="text" size="20" name="VisitorName"><br><br>

Your Comment:<br>
<textarea name="VisitorComment" rows="4" cols="20">
</textarea><br><br>

<input type="submit" value="Email This Form">

</form>

For PHP


Code:
Code for sendeail.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<title>Sendemail Script</title>
</head>
<body>

<!-- Reminder: Add the link for the 'next page' (at the bottom) --> 
<!-- Reminder: Change 'YourEmail' to Your real email --> 

<?php

$ip = $_POST['ip']; 
$httpref = $_POST['httpref']; 
$httpagent = $_POST['httpagent']; 
$visitor = $_POST['visitor']; 
$visitormail = $_POST['visitormail']; 
$notes = $_POST['notes'];
$attn = $_POST['attn'];


if (eregi('http:', $notes)) {
die ("Do NOT try that! ! ");
}
if(!$visitormail == "" && (!strstr($visitormail,"@") || !strstr($visitormail,"."))) 
{
echo "<h2>Use Back - Enter valid e-mail</h2>\n"; 
$badinput = "<h2>Feedback was NOT submitted</h2>\n";
echo $badinput;
die ("Go back! ! ");
}

if(empty($visitor) || empty($visitormail) || empty($notes )) {
echo "<h2>Use Back - fill in all fields</h2>\n";
die ("Use back! ! "); 
}

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

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

$notes = stripcslashes($notes); 

$message = " $todayis [EST] \n
Attention: $attn \n
Message: $notes \n 
From: $visitor ($visitormail)\n
Additional Info : IP = $ip \n
Browser Info: $httpagent \n
Referral : $httpref \n
";

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


mail("YourEmail", $subject, $message, $from);

?>

<p align="center">
Date: <?php echo $todayis ?> 
<br />
Thank You : <?php echo $visitor ?> ( <?php echo $visitormail ?> ) 
<br />

Attention: <?php echo $attn ?>
<br /> 
Message:<br /> 
<?php $notesout = str_replace("\r", "<br/>", $notes); 
echo $notesout; ?> 
<br />
<?php echo $ip ?> 

<br /><br />
<a href="contact.php"> Next Page </a> 
</p> 

</body>
</html>
Could be Edited at Will - Just change the Tags and Values.


Xyber 3D Studios
Designing with a difference


Reply With Quote
  # 3 (permalink)
Old
Junior Geek
Posts: 94
Join Date: Dec 2007
iTrader: (0)
Location: Romania, Pitesti
Re: [Problem] SEND - 12-22-2007

Waaaaww thanks man !!! I try it now !!!
Reply With Quote
  # 4 (permalink)
Old
Promotion Team Leader
Posts: 1,427
Join Date: Aug 2007
iTrader: (0)
Location: Sujangarh (Rajasthan,India)
Re: [Problem] SEND - 12-22-2007

You can download some script.
You just need to upload them and your contact form will be ready.

[use this option if you are not familiar with programming]


Directory forum| Webmaster Zone| Directory Point | Dierctory Blog
PR4
Bidding Directory | Blog of India
If Shadab is solution....I need my question back...

Reply With Quote
  # 5 (permalink)
Old
Junior Geek
Posts: 86
Join Date: Sep 2007
iTrader: (0)
Re: [Problem] SEND - 12-23-2007

I recommend this sort of script [not because i developed it] but because it seems to have been extremely popular on most other web development forums. It's a basic contact form that uses PHP. The major dynamic aspect of the form is that it allows the sender to choose the receiver from a drop down list.

You can find the tutorial here.


Freelance CMS - Where Design Meets Development

Web Design and Development Forums | Portfolio
Reply With Quote
Reply


Thread Tools



PSD to HTML

vBulletin®, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd. | SEO by vBSEO | Skin developed by vBStyles.com