View Full Version : Php form return problem

04-21-2010, 06:55 PM
i need help with my php script, in my form it only returns with the title: "Results from form" but nothing else follows.

in the form there are about 6 fields to be filled out and none of them are coming back to the specified email.

the redirect works fine and the email gets sent but the results arent coming with it. also its taking a while for the email to get there.

any help would be awesome as i already have traffic coming to my site and cant afford to lose valuable info. Thanks again!

04-21-2010, 06:57 PM
Please don't double post but it is better you have started your own thread. You've still not given a URL or any code yet so how are we to know what you have done/not done?

04-21-2010, 06:59 PM
yes i realized that i was actually in someone elses post so i opened my own. here is the website and php script that i got from this site

website: www.get-out-of-debt-help.com (http://www.get-out-of-debt-help.com)

php script im using: http://www.dreamweaverclub.com/dreamweaver-php-form.php

04-21-2010, 07:08 PM
You need to post your PHP code here.

04-21-2010, 07:10 PM
//--------------------------Set these paramaters--------------------------
// Subject of email sent to you.
$subject = 'New Lead';
// Your email address. This is where the form information will be sent.
$emailadd = 'myemail@yahoo.com';
// Where to redirect after form is processed.
$url = 'http://www.get-out-of-debt-help.com/thank_you.html';
// 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 = '1';
// --------------------------Do not edit below this line--------------------------
$text = "Results from form:\n\n";
$space = ' ';
$line = '
foreach ($_POST as $key => $value)
if ($req == '1')
if ($value == '')
{echo "$key is empty";die;}
$j = strlen($key);
if ($j >= 20)
{echo "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.'');
echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';

04-21-2010, 11:20 PM
can anybody help with this matter? i have traffic coming in and im losing peoples info by this not working. HELP PLEASE!

04-22-2010, 01:50 AM
where you have
Address" type="text" maxlength="1024" size="25" value="" name="Email Address" gtbfieldid="3"/>
i would remove
maxlength="1024" and value=""
i do not know what gtbfieldid="3"is but i would lose it

the form you are using has
$j = strlen($key);
if ($j >= 20)
this restricts the characters to 100 or a number that is suitable
or delete

if ($j >= 20)
{echo "Name of form element $key cannot be longer than 20 characters";die;}

test these things and report back if it works or not

04-22-2010, 02:04 AM
im looking for the codes you were implying to and i couldnt find them in my code:

"gtbfieldid" is no where to be found in my code at least not the one i have pasted here i dont know if you were looking at the source code online

im still looking for it though

"maxlength" is also not in my code

04-22-2010, 06:10 AM
they are in the form on your index page the link you posted. is that not what you meant

04-22-2010, 06:14 AM
no i was thinking in the actual php script but as it turns out, i did some testing and it seems the button doesnt like to work with a graphic it only likes the standard submit button on the forms menu. i tried to do it with my graphic button and it returns nothing but when i put the submit button from the forms menu it returns all information to my email.

so now back to the drawing board to figure out why the image button doesnt work.

04-22-2010, 07:47 AM
submit using an image
<input type="image" src="butup.gif" alt="Submit button">