/    Sign up×
Community /Pin to ProfileBookmark

I’m finishing up a php form to pull info from an htlm contact form and send it via email, but for some reason it won’t pull the html inputs. Here’s the relevant php code:

$name = $_POST[‘Name|at:name||Please enter your name.’];
$email_address = $_
POST[‘E-mail Address|at:email|r|Please enter a valid e-mail address.’];
$state = $_POST[‘State|at:state||Please choose your state of residence.’];
$zip = $_
POST[‘ZIP|at:zip||Please enter a valid ZIP code. You may use 0-9, spaces and the ( ) – + characters.’];
$phone = $_POST[‘Phone|at:phone||Please enter a valid phone number. You may use 0-9, spaces and the ( ) – + characters.’];
$contact_preference = $_
POST[‘How would you like to be contacted?|||Please indicate a contact preference by checking one of the boxes below.’];
$description_of_issue = $_POST[‘Brief description of your legal issue|at:message||Please describe your legal issue.’];

{
$to = $myemail;
$email_subject = “New Website Contact Form”;
$email_body = “You have received a new message.n”.
“Name: $namen”.
“E-Mail Address: $email_addressn”.
“State: $staten”.
“ZIP: ‘$zip’n”.
“Phone: $phonen”.
“Contact Preference: $contact_preferencen”.
“Description of Legal Issue: $description_of_issuen”.

And here’s the html that should be generating the info:

<div id=”containerIntakeFormI”>
<p class=”intakeFormINote”><strong>Bold</strong> labels and <img height=”15″ width=”15″ alt=”This graphic indicates a required field.” src=”design/images/formRequired.gif” /> indicate required information.</p>
<form action=”contact-form-handler.php” method=”post” name=”intakeFormI” id=”intakeFormI”>
<input name=”serverTime” type=”hidden” value=”1324622098″ />
<input type=”hidden” name=”SubscriptionID” value=”1335337″ />
<input type=”hidden” name=”email_subject” value=”Web site message from SiteDomain : Contact” />
<input type=”hidden” name=”removeFLBranding” value=”” />
<input type=”hidden” name=”guid” value=”BMqhdaGsjsmLPPJc9o4/d99frEXTGafZu/QzlM+fTVtjo8PDb+bTzKraPPpExxzowsPDyohsI0WkEMII6PU3bi0cTpIB3lNDawouqD6HqauAj93VqUSsWwnKgptCBbjruNVYfDQzMyDDEPXzFr2Dgnsm8RmLGL6efDwEz+YFRrY=” />
<input type=”hidden” name=”wld_id” value=”4167663″ />
<input type=”hidden” name=”thankyouPage” value=”Thank-You” />
<fieldset>
<legend>Personal Information</legend>
<label for=”intakeFormIName”>Name</label>
<div class=”formHighlight”>
<input type=”text” name=”Name|at:name||Please enter your name.” id=”intakeFormIName” />
</div>
<label for=”intakeFormIEmailAddress”><strong>E-mail Address</strong><img height=”15″ width=”15″ alt=”This field is required.” src=”design/images/formRequired.gif” /></label>
<label for=”intakeFormIEmailAddress” class=”formHide”><strong>Please enter a valid e-mail address.</strong></label>
<div class=”formHighlight”>
<input type=”text” name=”E-mail Address|at:email|r|Please enter a valid e-mail address.” id=”intakeFormIEmailAddress” class=”validate email” />
</div>
<label for=”intakeFormIState”>State</label>
<select id=”intakeFormIState” name=”State|at:state||Please choose your state of residence.”>
<option value=”DID NOT RESPOND” selected=”selected”>Select State</option>
<option value=”Alabama”>Alabama</option>
<option value=”Alaska”>Alaska</option>
<option value=”Arizona”>Arizona</option>
<option value=”Arkansas”>Arkansas</option>
<option value=”California”>California</option>
<option value=”Colorado”>Colorado</option>
<option value=”Connecticut”>Connecticut</option>
<option value=”Delaware”>Delaware</option>
<option value=”Florida”>Florida</option>
<option value=”Georgia”>Georgia</option>
<option value=”Hawaii”>Hawaii</option>
<option value=”Idaho”>Idaho</option>
<option value=”Illinois”>Illinois</option>
<option value=”Indiana”>Indiana</option>
<option value=”Iowa”>Iowa</option>
<option value=”Kansas”>Kansas</option>
<option value=”Kentucky”>Kentucky</option>
<option value=”Louisiana”>Louisiana</option>
<option value=”Maine”>Maine</option>
<option value=”Maryland”>Maryland</option>
<option value=”Massachusetts”>Massachusetts</option>
<option value=”Michigan”>Michigan</option>
<option value=”Minnesota”>Minnesota</option>
<option value=”Mississippi”>Mississippi</option>
<option value=”Missouri”>Missouri</option>
<option value=”Montana”>Montana</option>
<option value=”Nebraska”>Nebraska</option>
<option value=”Nevada”>Nevada</option>
<option value=”New Hampshire”>New Hampshire</option>
<option value=”New Jersey”>New Jersey</option>
<option value=”New Mexico”>New Mexico</option>
<option value=”New York”>New York</option>
<option value=”North Carolina”>North Carolina</option>
<option value=”North Dakota”>North Dakota</option>
<option value=”Ohio”>Ohio</option>
<option value=”Oklahoma”>Oklahoma</option>
<option value=”Oregon”>Oregon</option>
<option value=”Pennsylvania”>Pennsylvania</option>
<option value=”Puerto Rico”>Puerto Rico</option>
<option value=”Rhode Island”>Rhode Island</option>
<option value=”South Carolina”>South Carolina</option>
<option value=”South Dakota”>South Dakota</option>
<option value=”Tennessee”>Tennessee</option>
<option value=”Texas”>Texas</option>
<option value=”Utah”>Utah</option>
<option value=”Vermont”>Vermont</option>
<option value=”Virginia”>Virginia</option>
<option value=”Washington”>Washington</option>
<option value=”Washington DC”>Washington DC</option>
<option value=”West Virginia”>West Virginia</option>
<option value=”Wisconsin”>Wisconsin</option>
<option value=”Wyoming”>Wyoming</option>
</select>
<label for=”intakeFormIZipCode”>ZIP</label>
<div class=”formHighlight”>
<input type=”text” name=”ZIP|at:zip||Please enter a valid ZIP code. You may use 0-9, spaces and the ( ) – + characters.” id=”intakeFormIZipCode” />
</div>
<label for=”intakeFormIPhoneNumber”>Phone</label>
<div class=”formHighlight”>
<input type=”text” name=”Phone|at:phone||Please enter a valid phone number. You may use 0-9, spaces and the ( ) – + characters.” id=”intakeFormIPhoneNumber” />
</div>
</fieldset>
<fieldset>
<legend>Contact Preferences</legend>
<p>How would you like to be contacted?<br />
Check all that apply.</p>
<div class=”formCheck”>
<label for=”intakeFormIViaEmail”><input type=”checkbox” id=”intakeFormIViaEmail” name=”How would you like to be contacted?|||Please indicate a contact preference by checking one of the boxes below.” value=”E-mail” />E-mail</label>
<label for=”intakeFormIViaPhone”><input type=”checkbox” id=”intakeFormIViaPhone” name=”How would you like to be contacted?|||Please indicate a contact preference by checking one of the boxes below.” value=”Phone” />Phone</label>
</div>
<input class=”intakeFormHiddenInput” type=”hidden” id=”checkboxContactPreferencesIntakeFormI” name=”cgi|checkboxContactPreferencesIntakeFormI” value=”How would you like to be contacted?|||Please indicate a contact preference by checking one of the boxes below.” />
</fieldset>
<fieldset>
<legend>How Can We Help You?</legend>
<label for=”intakeFormIHelpYou” class=”formDescribeIssue”>Brief description of your legal issue</label>
<div class=”formHighlight”>
<textarea name=”Brief description of your legal issue|at:message||Please describe your legal issue.” id=”intakeFormIHelpYou” rows=”4″ cols=”15″></textarea>
</div>
<p><img height=”50″ width=”50″ alt=”” src=”design/images/formDisclaimer.gif” class=”formDisclaimer” />The use of the Internet or this form for communication with the firm or any individual member of the firm does not establish an attorney-client relationship. Confidential or time-sensitive information should not be sent through this form.</p>
<div class=”formCheck”>
<label for=”intakeFormIDisclaimerCheck” class=”formHide”><strong>Please verify that you have read the disclaimer.</strong></label>
<label for=”intakeFormIDisclaimerCheck”><input type=”checkbox” name=”Read disclaimer||r|Please verify that you have read the disclaimer.” id=”intakeFormIDisclaimerCheck” class=”validate checkbox” value=”yes” /><strong>I have read the disclaimer.</strong><img height=”15″ width=”15″ alt=”This field is required.” src=”design/images/formRequired.gif” /></label>
<input class=”intakeFormHiddenInput” type=”hidden” id=”checkboxDisclaimerIntakeFormI” name=”cgi|checkboxDisclaimerIntakeFormI” value=”Read disclaimer||r|Please verify that you have read the disclaimer.” />
</div>
</fieldset>
<input type=”submit” id=”intakeFormISubmit” name=”Submit” value=”Send this message” />

As far as I can tell, I’ve done everything right. It seems like the disconnect is occurring because of the inputs at the top of the php form, but I’m stumped…

Can anybody help?

Thanks.

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@jeffrey83Feb 18.2012 — Hi

my solution attach html send email was Amazon Simple Email Service PHP

Download lib php-aws-ses and unzip

usage

[code=php]
require_once('ses.php');
$ses = new SimpleEmailService('YOUR-ACCESS-KEY-ID', 'YOUR-SECRET-ACCESS-KEY');
$m = new SimpleEmailServiceMessage();
$m->setFrom('[email protected]');
$m->addTo('[email protected]');
$m->setSubject('This is a Test');
$m->setMessageFromString('This is the message body.');
$m->addRawMessageFromString('html', '<b>This <i>is</i> the HTML</b> message', 'text/html');
$ses->sendEmail($m);
[/code]


Read more



---------------------------------------------------
Learn Yii , Tip PHP , Tip Jquery

Secrets to selling Iphone , Ipad app , Secrets to selling your andoid app
×

Success!

Help @austinonlinesol 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 5.21,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...