logo-dw

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

Reply
 
Thread Tools Display Modes
Old 06-12-2012, 06:38 PM   #1
ohiodoc
 
Join Date: Dec 2011
Posts: 10
Default form comes back in differnet order

I have this form and it works but when they fill it out the text file I get in my email comes in a different order then when they fill it out. Why is it doing this?
Here is the link. I need help with this.
http://www.residenceforpatriots.org/save.html
ohiodoc is offline   Reply With Quote
Old 06-12-2012, 08:38 PM   #2
domedia
Administrator
domedia's Avatar
 
Join Date: Dec 2003
Posts: 9,730
Default

The script that generates your email has the values from the form set in a different order.
domedia is offline   Reply With Quote
Old 06-12-2012, 08:41 PM   #3
ohiodoc
 
Join Date: Dec 2011
Posts: 10
Default

So how do i change so it stays in the same order?
ohiodoc is offline   Reply With Quote
Old 06-13-2012, 01:22 AM   #4
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

cant say without seeing your mailing script
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 06-13-2012, 01:26 AM   #5
ohiodoc
 
Join Date: Dec 2011
Posts: 10
Default

I am using godaddys php for the mail script.
ohiodoc is offline   Reply With Quote
Old 06-13-2012, 04:17 AM   #6
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

then ask them, if we dont see it how can we help?
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 06-13-2012, 03:47 PM   #7
ohiodoc
 
Join Date: Dec 2011
Posts: 10
Default

here is the mail script

<?php
$request_method = $_SERVER["REQUEST_METHOD"];
if($request_method == "GET"){
$query_vars = $_GET;
} elseif ($request_method == "POST"){
$query_vars = $_POST;
}
reset($query_vars);
$t = date("U");

$file = $_SERVER['DOCUMENT_ROOT'] . "/../data/gdform_" . $t;
$fp = fopen($file,"w");
while (list ($key, $val) = each ($query_vars)) {
fputs($fp,"<GDFORM_VARIABLE NAME=$key START>\n");
fputs($fp,"$val\n");
fputs($fp,"<GDFORM_VARIABLE NAME=$key END>\n");
if ($key == "redirect") { $landing_page = $val;}
}
fclose($fp);
if ($landing_page != ""){
header("Location: http://".$_SERVER["HTTP_HOST"]."/$landing_page");
} else {
header("Location: http://".$_SERVER["HTTP_HOST"]."/");
}
ohiodoc is offline   Reply With Quote
Old 06-15-2012, 02:22 AM   #8
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

i think it would be a mistake to mess with this, looks like the mailing is dome from another form that this date is inserted in. Its a simple generic form i would use a different one the one hee is pretty much the same

http://www.dreamweaverclub.com/dreamweaver-php-form.php you may need to increase the
if ($j >= 20)
{echo "Name of form element $key cannot be longer than 20 characters";die;}

to allow more characters to be included.
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Reply


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 01:58 AM.


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