Sponsored by NuSphere - PHP Software for PHP Application Developers - On Sale This Week for $100



Go Back   PHP-Editors > Programming Contests > PHP Programming Contests

PHP Programming Contests Everything to do with the PHP Programming Contests.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 2004-10-21, 03:16 AM
Junior Member
 
Join Date: Oct 2004
Posts: 2
fionamcl
Default

I've tried to put the sendfrom email = bookings@domain.com as well but it is being overridden by the client login and domain name.

What I'd like is for the person who's entered their email address to be the address used in the 'sendfrom'. Any help would be much appreciated.

Thanks


<?php session_start(); ?>
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified
header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false);

header("Pragma: no-cache"); // HTTP/1.0

?>
<?php
ob_start();
//get action

$a = @$HTTP_POST_VARS["a"];

if (empty($a))

{

$a = "I"; //display with input box

}

$x_Name = @$HTTP_POST_VARS["NAME"];
$x_Email = @$HTTP_POST_VARS["EMAIL"];
$x_Phone = @$HTTP_POST_VARS["PHONE"];
$x_Details = @$HTTP_POST_VARS["DETAILS"];

switch ($a)

{

case "I": // Get a record to display

break;



case "E": // Update



// Send info to Site Administrator

ini_set("sendmail_from",@$HTTP_POST_VARS["EMAIL"]);

ini_set('SMTP', "LOCALHOST");


$message = "Booking Enquiry: \n------------------------\n";



$message .=str_pad("Name", 30)."\t".$x_Name."\n";

$message .=str_pad("Phone", 30)."\t".$x_Phone."\n";

$message .=str_pad("Email", 30)."\t".$x_Email."\n\n";



$message .=$x_Details."\n";

$email = "me@mywebsite.com";

mail($email, "Booking Enquiry", $message);

header("Location: thanks.htm");

break;

}



?>
Reply With Quote
  #2 (permalink)  
Old 2004-11-04, 10:52 AM
Junior Member
 
Join Date: Nov 2004
Posts: 2
himakumar
Default

Hi,

$headers="from :bookings@domain.com";

mail($email, "Booking Enquiry", $message,$headers);
Reply With Quote
Must read Review for Serious PHP Developers


NuSphere PhpED 5.0 : The Staff of php-editors.com recently spent a few days working with NuSphere PhpED 5.0 (a popular PHP IDE) and NuCoder 1.4 (a PHP Encoding Utility), read up on all the details.

Sponsored Links
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:10 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.