why won't this write?

<?
require ("config.php");
if ($action) {

If ($name=="") {
echo "Form Error >> No Name";
echo "$errorbk";
}
else if ($email=="") {
echo "Form Erorr >> No e-mail";
echo "$errorbk";
}
else if ($input=="") {
echo "Form Error >> No Comment found";
echo "$errorbk";
}
else if ($wb=="1") {
mail($webemail, $subject, $input);
}
if ($action) {
$data = "$name\n$email\n$input";
$fp = fopen("messages.txt",'a');
$fw = fwrite($fp,$data,$subject);
fclose($fp);
echo "Thank you";
}
}
else if (!$action) {
echo "<html>

<head>
<meta name='GENERATOR' content='Microsoft FrontPage 5.0'>
<meta name='ProgId' content='FrontPage.Editor.Document'>
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>
<title>$pagetitle</title>
</head>

<body>

<form method='POST' action='?action=send'>
<p align='left'><font face='Tahoma'><font size='2'>Commentie Version
1.0</font><br>
<font size='2'>Your Name </font>
<input type='text' name='name' size='20' style='font-family: Tahoma;
font-size: 10pt'><br>
<font size='2'>Your E-mail</font><input type='text' name='email' size='20'
style='font-family: Tahoma; font-size: 10pt'><br>
<font size='2'>Your msg / comment</font><br>
<textarea rows='2' name='input' cols='20' style='font-family: Tahoma;
font-size: 10pt'></textarea><br>
</font>
<font size='2' face='Tahoma'>e-mail &amp; save </font><font face='Tahoma'>
<select size='1' name='wb' style='font-family: Tahoma; font-size: 10pt'>
<option selected value='1'>Yes</option>
<option value='0'>No</option>
</select></font></p>
</p>
<p align='left'>
<font face='Tahoma'>
<input type='submit' value='Submit' name='B1' style='font-family: Tahoma;
font-size: 10pt'><input type='reset' value='Reset' name='B2'
style='font-size: 10pt; font-family: Tahoma'></font></p>
</form>

</body>

</html>";
}
?>





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to