Forum Moderators: coopster
My php forms have just stopped working, upon "submit", i get the same blank form, no fwd email, or "thank you" page is generated, the host said its because the new php release does not support certain older code. I used very basic code. do you have any idea of where to check or which code could it be?
Thanks
I did replace the variables with the $POST_[], its still not working. notice that I use $PHP_SELF, is this ok.
this is a sample of code:
Thanks
<?php
if (!$submit ¦¦ (!$POST_['email'] ¦¦!$POST_['body']))
{ if ($submit && (!$POST_['email'] ¦¦!$POST_['body']))
echo "You must fill in both an e-mail address and a message.\n";
?>
<form method="post" action="<?php echo $PHP_SELF;?>">
<p>
<b>Are you contacting us about something that regards the web site?</b><br>
<input type="radio" name="website" value="yes"> Yes<br>
<input type="radio" name="website" value="no"> No
</p>
<p>
What is your e-mail address?<br>
<input type="text" name="email">
</p>
<p>
Type your message to us in the following box:<br>
<textarea name="body" wrap="virtual" rows="10" cols="60"></textarea>
</p>
<input type="submit" name="submit" value="Send" class="default">
</form>
<?php
$email = $POST_['email'];
} else {
$to = "name@domain.com";
if ($POST_['website'] == "yes")
$to = "name@domain.com";
mail($to, "feedback", $POST_['body'], "From: $email");
echo "<p>Your message was sent. Thank you!</p>\n";
}
?>
[edited by: jatar_k at 8:47 pm (utc) on June 4, 2003]
[edit reason] removed specifics [/edit]