Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old February 27th, 2005, 09:55 PM
googs googs is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 3 googs User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Problems with Re-Direct from form to PHP script

I have a PHP-driven send mail script which gets its data from an HTML form
From what I can gather, the re-direct is not functioning properly

PROBLEM *** When the user clicks the submit button the browser’s (any of them) URL windos changes to the form’s action (the PHP script)

All of the data submitted through the form is sent along with formatting It’s just the user never gets re-directed.

I have made sure that all of the CMOD settings are set to 777
The funny thing is I originally wrote the script and it still works on the site I did it for a year ago.

Here’s the code for the PHP script:

<?php
/************************************************** *
* PHP 4.1.0+ version of email script.
************************************************** */
//
//
$sendTo = "user@AOL.com";
$subject = "Your request from Design";
//
//
$headers = "From: " . $_POST["companyname"];
$headers .= "<" . $_POST["email"] .">rn";
// next include a Reply-To:
$headers .= "Reply-To: " . $_POST["email"];
//
//
$message = $_POST["companyname"] ."rn";
$message .= $_POST["address"] ."rn";
$message .= $_POST["phone"] ."rn";
$message .= $_POST["email"] ."rnn";
$message .= $_POST["message"];
//
//
$redirect = "thanks.html";
mail($sendTo, $subject, $message, $headers);
?>

Here’s the form code snippet:

<form action="phpmail.php" method="post" enctype="multipart/form-data" name="form1">
<p>
<input name="companyname" type="text" id="companyname4">
Company Name*</p>
<p>
<input name="address" type="text" id="address4">
Address
<input type=hidden name="redirect" value="thanks.html">
</p>
<p>
<input name="phone" type="text" id="phone4">
Phone</p>
<p>
<input name="email" type="text" id="email4">
Email*</p>
<p>
<textarea name="message" id="textarea3"></textarea>
Questions</p>
<p>
<input type="submit" name="Submit" value="Submit">
</p>
<p>
<input type="reset" name="Submit2" value="Reset">
</p>
</form>


Can this have anything to do with the fact that I have another form on my site of which the redirect = thanks.html (This is the re-direct page of the script that has the problem)? Would two re-directs to the same page render one of them inoperable?

Any help on this issue is greatly appreciated

Reply With Quote
  #2  
Old March 1st, 2005, 08:15 PM
trippleweb's Avatar
trippleweb trippleweb is offline
Contributing User
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Victoria, BC, Canada
Posts: 702 trippleweb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 26 m 5 sec
Reputation Power: 2
RE: Problems with Re-Direct from form to PHP script

<?php
/************************************************** *
* PHP 4.1.0+ version of email script.
************************************************** */
//
//
$sendTo = "user@AOL.com";
$subject = "Your request from Design";
//
//
$headers = "From: " . $_POST["companyname"];
$headers .= "<" . $_POST["email"] .">rn";
// next include a Reply-To:
$headers .= "Reply-To: " . $_POST["email"];
//
//
$message = $_POST["companyname"] ."rn";
$message .= $_POST["address"] ."rn";
$message .= $_POST["phone"] ."rn";
$message .= $_POST["email"] ."rnn";
$message .= $_POST["message"];
//
//this is only assigning a variable
$redirect = "thanks.html";
//mailing..
mail($sendTo, $subject, $message, $headers);
//add this to redirect after complete
header("Location: thanks.html"};
exit();
?>

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > Problems with Re-Direct from form to PHP script


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT