Hello again!
I am back with a new problem! :rolleyes:
I am getting an Inappropriate ioctl error when the page loads...
Error:
Warning: fopen("", "a") - Inappropriate ioctl for device in /usr/local/customer_service/customer_service.php3 on line 18
Here is the code:
<html>
<head>
<title>Customer Service Form</title>
</head>
<body>
<img src = "logo.jpg" border="0">
<body bgcolor="#FFFFFF">
<?php
if (isset($submit)):
if ($type=="comment"):
$file = "comments.html";
elseif ($type=="suggestion"):
$file = "suggestions.html";
else:
$file = "complaints.html";
endif;
endif;
if(!$open_file = fopen($file, "a")):
print ("Error! File can't be opened!");
else:
$date = date ("m d, Y");
$comments = "Feedback from $name, $email on $date\n\nThe feedback is:\n$feedback\n";
fwrite ($open_file,"<pre>$comments</pre><hr>");
fclose ($open_file);
$company_to = "user@domain.com";
$subject1 = "Feedback from the website!";
$subject2 = "Thanks for your feedback!";
$body = "thanks for your recent feedback\\nOur customer service department is looking over your matter and should get back to you shortly.\n";
$body.= "\n\nCustomer Service Department";
mail ($company_to,$subject1,$comments);
mail ($email,$subject,$body);
?>
<h2>Contact Us!</h2>
<form action = "customer_service.php3" method = "POST">
<input type = "radio" name = "type" value = "comment"> Comment on our site and services.
<br><input type = "radio" name = "type" value = "suggestion"> Suggest Improvements.
<br><input type = "radio" name = "type" value = "complaints"> File a complaint with Customer Service.
<br><p>Please Enter Your Feedback:
<br><textarea name = "feedback" cols = "40" rows = "10"></textarea>
<p>Name: <input type = "text" name = "name">
<br>E-Mail: <input type = "text" name = "email">
<p><input type = "submit" name = "submit" value = "submit"><input type="reset">
</form>
<?
endif;
?>
</body>
</html>
Thank you for your help!
p0nzo