PDA

View Full Version : need help with my form


gkw
05-10-2006, 10:39 PM
Ive created a form using php by following this tutorial (http://www.dreamweaverclub.com/dreamweaver-php-form.php) but when I click the submit button it redirects fine but i never recieve an email.

Everything seems to be working but I just dont recieve anything.

Cany anyone help?

This is what ive got.....


<?php
//--------------------------Set these paramaters--------------------------

// Subject of email sent to you.
$subject = 'Question For Grant';

// Your email address. This is where the form information will be sent.
$emailadd = 'wassell9@hotmail.com';

// Where to redirect after form is processed.
$url = 'biography.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.'">';
?>

Creative Insanity
05-11-2006, 05:16 AM
This has to be sent from a server with a mail server installed.. use a hoster if you have one.

This one is for Linux servers send mail option.

gkw
05-11-2006, 09:18 AM
How do I do that?

davidj
05-11-2006, 02:22 PM
find a host that supports PHP and all its toys

then get ya wallet out and pay for a years hosting

then upload your script and bobs your aunties uncle... your on ya way to email city

gkw
05-13-2006, 08:45 AM
Cheers fella. Just found out that my host doesnt support cgi's and PHP scripts, great hosts they are.

dthomsen8
05-13-2006, 01:52 PM
Cheers fella. Just found out that my host doesnt support cgi's and PHP scripts, great hosts they are.

Many web hosting companies support PHP, and sometimes CGI, even in their least expensive packages. Find another hosting company.

gkw
05-16-2006, 01:09 PM
Ive just uploaded my site to a new host which supports cgi's and php scripts but I still dont recieve anything in my email account.

http://www.gfunk-online.co.uk/new%20design/contact.html

gkw
05-16-2006, 11:01 PM
Anyone?

gkw
05-17-2006, 09:29 PM
can anyone help me with this?

gkw
05-20-2006, 11:34 AM
For the last time, can anyone help me with my problem?