/    Sign up×
Community /Pin to ProfileBookmark

PHP issues! Please Help!!!!

I am currently working on a form that submits to a php file. Everything works in the code except the redirecting portion at the end of the code. I want it to redirect to midtown_thankyou.htm but nothing happens. All the files are located in the same folder so there is no looking for the file. Belowe is the code. Please help!

<?

//***************************** TEXT FILE

if(file_exists(“results/residences_list.txt”))
{
$newfile = fopen(“results/residences_list.txt”, “r”);
while(!feof($newfile))
{
$duplicate = fgetss($newfile, 255);

}

fclose($newfile);
$addemail = fopen(“results/residences_list.txt”, “a”);
fputs($addemail, “$Namet $Addresst $Cityt $Statet $Zipt $Phonet $Emailt $Unitt $Currentt $Interestt $Aget $Referencet $Commentsn”);
fclose($addemail);
}
else
{
// since file doesn’t already exist, let’s create for first time
$newfile = fopen(“results/residences_list.txt”, “a”);
fputs($newfile, “$Namet $Addresst $Cityt $Statet $Zipt $Phonet $Emailt $Unitt $Currentt $Interestt $Aget $Referencet $Commentsn”);
fclose($newfile);
chmod(“results/residences_list.txt”, 0666);
}

// BELOW IS THE EMAIL PORTION OF THE FORM

mail( ” “,
//mail( “”,
“Midtown East”,
$message = “Name: $Namen
Email: $Emailn
Address: $Address, $City, $State $Zipn
Phone: $Phonen
Unit Size And Price: $Unitn
Currently: $Currentn
Interest: $Interestn
Age: $Agen
Reference: $Referencen
Comments: $Comments”,
“From: $Email” );

//**** AUTO RESPONDER EMAIL
mail(“$Email”,
“Thank You!”,
$message = “PLEASE DO NOT REPLY TO THIS AUTOMATED NOTIFICATION!nn
Thank you for your interest in Midtown East, the first luxury condominium tower in Midtown, Reston Town Center’s most exciting new addition. We have placed your name on our Priority Preview List. We will send you more information about these fabulous new condominium homes, as it becomes available and before our opening to the general public. At Midtown East, you will experience the vitality and convenience of a true urban neighborhood, while enjoying the style, fine finishes and spa-like amenities of your new condominium home. nn
We appreciate your interest in Midtown East and look forward to being in touch again soon.nn
Sincerely, nn
The Midtown East Sales Teamn
THE MAYHOOD COMPANYn
Agent for the Seller”,
“From: ” ); //<– REPLACE WITH CORRECT EMAIL
header( “Location: midtown/midtown_thankyou.htm” ); //<— THIS IS THE REDIRECT PAGE
?>

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@amarquezauthorSep 08.2003 — GOIT IT FIXED. THANKS ANYWAYS!
×

Success!

Help @amarquez 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.27,
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,
)...