Topic: HELPPPPPPPPPPPPPPPPPPPPP!!!!!!!!!!!!!!!!!!!!!!!!!
I designed and tested out a form that sends it's results to an email and it worked perfectly well before i tried to add an image uploader which i had some bugs with. I then decided to cancel the image uploader field in the form and optrd to redirect the user to an image uploader page which i created seperatlely after the form has been submitted to the specified email. But after doing this, i noticed that the stupid form would no longer process information but instead it gives me an error page like this,
"The requested method POST is not allowed for the URL /sendresults.php".
The php script i use for processing the form is
<?php
//--------------------------Set these paramaters--------------------------
// Subject of email sent to you.
$subject = 'Registration Details';
// Your email address. This is where the form information will be sent.
$emailadd = 'the email address i use';
// Where to redirect after form is processed.
$url = 'the confirmation page in my server';
// 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 == '')
{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.'">';
?>
Please am i doing something wrong?
