Email Processor


Posted on 16th Feb 2014 07:03 pm by admin

I have a few questions so this post will be a larger one! Sorry, but I'm a bit of a PHP newbie so be gentle with me!

Awhile back I wrote out a simple forum to email processor that I used with a few sites I have. I found this past week or so that all of a sudden they were not working. I was told that I need to replace any $variable with $_REQUEST[variable]. I did do this as seen in the code below but I found that if I added the $_REQUEST before $timestamp in the $thankyoumessage that the time would not display on the page but it would work if I left it as $timestamp. The same goes for if I were to include the $subject in the $body. It will not display if I add $_REQUEST before $subject if I were to add that to the $body.

I was curious to know if someone could tell me why this is? These processors used to work fine with just $variable. If I don't use the $_REQUEST for the forum variables it just generates blank responses in the email.


my current script is: (i'm also aware that the date/time fuctions only works with php 5 and the sites where this processor is being used both use 5)

Code: <?php

date_default_timezone_set('America/Edmonton');

$yourEmail = "blank@blank.com";

$subject = "Quote Request";

$body = "Contact Information
n First Name: $_REQUEST[first_name] n Last Name: $_REQUEST[last_name] n Company Name: $_REQUEST[company_name] n Contact Number: $_REQUEST[contact_number] n Email Address: $_REQUEST[email] n Project Information n Project is: $_REQUEST[project] n Describe what needs to be done: $_REQUEST[describe] n Estimate # of Pages: $_REQUEST[number_pages] n Will you provide a logo: $_REQUEST[provide_logo] n Will you provide artwork: $_REQUEST[artwork] n Will you provide body copy: $_REQUEST[body_copy] n E-commerce features required: $_REQUEST[ecommerce] n Website Maintanence: $_REQUEST[maintanence] n Timeframe for completion: $_REQUEST[timeframe]";


$timestamp = date("n/j/Y, a\t g:i a T");


$thankyousubject = "Quote Request Submitted Successfully n on n $timestamp";


$thankyoumsg = "Thank you $_REQUEST[first_name] $_REQUEST[last_name] for showing interest in designFox Media Works. Please allow 24-48 business hours for a response.";

?>
<?php
mail($yourEmail, $subject, $body, "From: $_REQUEST[first_name] $_REQUEST[last_name] < $_REQUEST[email] >");
print "<CENTER><B><body bgcolor='#000000'><font color='#FFFFFF'> $thankyousubject </B></CENTER>

<center>$thankyoumsg</center><BR><BR><CENTER>

</font><A HREF="http://www.designfoxmediaworks.com" TARGET="_top"><IMG SRC="http://www.designfoxmediaworks.com/images/formbanner.gif" WIDTH="600" HEIGHT="100" ALT="Return to designFox Media Works" BORDER="0"></A></CENTER></body>"
I was also curious in reference to this processor is there a set way to have a timed redirect with php? Or would it be better to look into doing that with javascript?

My next question is, if I wanted to have say a rich text editor replace a comment box how would one go about sending that data in the email processor or post it to another page?

No comments posted yet

Your Answer:

Login to answer
196 Like 10 Dislike
Previous forums Next forums
Other forums

PHP arrays into arrays need help
Hello
I am trying to highlight the days on my calendar based on the dates that i have in my datab

Legal Issues for SAP ERP o ERP in general
Hi experts,

Can someone please help me finding some documentation about legal issues tha

my code does not work.
I have a code problem.

Quote"<a href=index.php?gogo=ureticidetay&'?l={$le

Track downloads' status
Hello,

I need to make somehow, some system, to track whether downloads are completed or faile

PHP error on MySQL insert
I'm sure it's the simplest of issues, but I can't recall why this isn't working.

Code: [Selec

modifying query string with no page refresh
Hi everybody,
I've tried to get info about my problem all over the internet but i didn't find out

SQL query not working well
Hi,
I made a small table with 5 rows and want to make them an sql consult using rownum

Dynamic memory problem
Hey,

At the beginning of my code, I have this line:

Shape* gShape = 0;

PHP Code To Change Font Color in Table Cell
I would appreciate help with the following snippet of my php code. I am just trying to change the f

PDO returns erroneous columns from within pdt
Hi All,

This is a truly weird behavior:
When using a simple pdo fetch, erroneous columns a

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash