Go Back   Dreamweaver Club Forums > Hand Coders Forum > PHP
Register FAQ Members List Search Today's Posts Mark Forums Read

Thread Tools Display Modes
Old 06-11-2012, 01:36 AM   #1
Join Date: Jun 2012
Posts: 1
Default form not re-direting

I have built a form for a mobile site at http://m.totallytogether.com/
In the sendresults.php file set to forward the user back to the home page after the form is submitted.
instead the user is being forwarded to http://m.totallytogether.com/sendresults.php
other than that, the form appears to work correctly - i get the results emailed to me.
What do I need to do to have the user go somewhere other than the http://m.totallytogether.com/sendresults.php page

here is the php file;

PHP Code:
//--------------------------Set these paramaters--------------------------

// Subject of email sent to you.
$subject 'Results from TT Mobile Contact form'

// Your email address. This is where the form information will be sent. 
$emailadd 'neil@jackeen.com'

// Where to redirect after form is processed. 
$url 'http://m.totallytogether.com'

// Makes all fields required. If set to '1' no field can not be empty. If set to '0' any or all fields can be empty.
$req '0'

// --------------------------Do not edit below this line--------------------------
$text "Results from form:\n\n"
$space ' ';
$line '
foreach (
$_POST as $key => $value)
if (
$req == '1')
if (
$value == '')
"$key is empty";die;}
$j strlen($key);
if (
$j >= 20)
"Name of form element $key cannot be longer than 20 characters";die;}
$j 20 $j;
for (
$i 1$i <= $j$i++)
$space .= ' ';}
$value str_replace('\n'"$line"$value);
$conc "{$key}:$space{$value}$line";
$text .= $conc;
$space ' ';
mail($emailadd$subject$text'From: '.$emailadd.'');
'<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';

Last edited by domedia; 06-11-2012 at 02:49 PM.. Reason: php tags
jackeen is offline   Reply With Quote
Old 06-12-2012, 10:26 AM   #2
davidj's Avatar
Join Date: Sep 2005
Location: The Toon (newcastle upon Tyne)
Posts: 8,256

Instead of...

echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';

PHP Code:
Would you like to learn PHP from me? Check out -> www.codezenith.co.uk
davidj is offline   Reply With Quote

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 04:14 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com