/    Sign up×
Community /Pin to ProfileBookmark

Email from PHP doesn’t include my radio/checkboxes

I’m using this crude PHP script to send the results of a form to my email:

[code=php]
<?php
// Please specify your Mail Server – Example: mail.yourdomain.com.
ini_set(“SMTP”,”mail.southpinecafe.com”);

// Please specify an SMTP Number 25 and 8889 are valid SMTP Ports.
ini_set(“smtp_port”,”25″);

// next two lines added by REW, CrystalTech
// Please specify the return address to use
ini_set(‘sendmail_from’, ‘[email protected]’);
#######################################################
# This script is Copyright 2003, Infinity Web Design #
# Distributed by http://www.webdevfaqs.com #
# Written by Ryan Brill #
# All Rights Reserved – Do not remove this notice #
#######################################################

## The lines below need to be edited…

###################### Set up the following variables ######################
#
$to = “[email protected]”; #set address to send form to
$subject = “You’ve received a new Online Application!”; #set the subject line
//$headers = “From: [email protected]”; #set the from address, or any other headers//
$forward = 1; # redirect? 1 : yes || 0 : no
$location = “http://www.southpinecafe.com”; #set page to redirect to, if 1 is above
#
##################### No need to edit below this line ######################

## set up the time ##

$date = date (“l, F jS, Y”);
$time = date (“h:i A”);

## mail the message ##

$msg = “Below is the result of your feedback form. It was submitted on $date at $time.nn”;

if ($_SERVER[‘REQUEST_METHOD’] == “POST”) {
foreach ($_POST as $key => $value) {
$msg .= ucfirst ($key) .” : “. $value . “n”;
}
}
else {
foreach ($_GET as $key => $value) {
$msg .= ucfirst ($key) .” : “. $value . “n”;
}
}

mail($to, $subject, $msg, $headers);
if ($forward == 1) {
header (“Location: $location”);
}
else {
echo “Thanks!”;
}

?>

[/code]

I can’t seem to get all of the fields, checkboxes and text boxes alike to show in the results email : southpinecafe.com/employment.php

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @amberfrances spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...