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?
Code Help.. If txt input box empty search X instead..
I am having a problem with my search script. At current it will simply search by a selected date which is a java based calendar that displays when using id='datedisplay' in the input form field below.
SESSION CHECK WORKS "MOST" of the time... whats going on?
i have a sign in check thats included in every page that is a members only page which is basically all of my pages. that im working on anyways..but heres the code..... that works MOST of the time.
Help with some dates
I have a list of dates in an array:$mondays = array( strtotime("October 12, 2009"), strtotime("October 19, 2009"), strtotime("October 26,
TCP Sending Unsigned Char...
Hi...
Alternate messaging
I have 4 strings in MySQL db1$string1 : Hello$string2 : Hi$string3 : Great$string4 : ThanksAnd I have 3 accounts MySQL db2$User1 : $Pw1$User2 : $Pw2$User3 : $Pw3expected result---------------Hello
HELP with mysql_real_escape_string
I'm looking to remove apostrophes completely when someone enters lyrics but don't have a clue how to do it.I've attached the 'submit lyric' page and the page where I approve submitted lyrics.(they're
Where do I put CRON code
So I've figured out alot about how to automatically run a php function. I can't figure out where to put the CRON code do I put it in the header between the head tags? do I put it before any html code?
couldn't connect to your database
Hello I am new to php mysqlActually i have read A tutorial on nettuts"http://net.tutsplus.com/tutorials/php/create-a-signup-form-with-email-confirmation/"According i copy all source code
Database/Table Collation
What is the Database, and table collations used for? i don't understand what there used for since columns have there already set collation....
problem with php server update from mid 2009
Hi,I have this navigation menu on 2 websites which used to work just fine. After a recent update to the php server, the menu stopped working properly. It still loads the pages but the highlighted