I am a super novice. It usually takes me 6 to 8 hours of trial and error for me to figure out something that is probably simple to everyone on here. I’ve finally met my match. I was simply adding a PHP code to save form info to a CSV file, but I keep getting errors. The error I get is:
Warning: fopen(, ) [function.fopen]: failed to open stream: Invalid argument in www.mywebsite.com/webpage.php on line 93
Here is the code:
[php]
$filelocation= $_SERVER[‘httpdocs/formtest.csv’] .
$cvsData = $Name . “,” . $phone . “,” . $phone2 . “,” . $Email . “,” . $stories . “,” . $squarefootage . “,” . $screens . “,” . $shingles . “,” .$numbgutters . “,” . $screenquote . “,” . $treepruning . “,” . $skylights . “,” . $zipcode . “,” . $hear ."\n";
$fp = fopen("$filelocation",“a”);
if($fp){
fwrite($fp,$cvsData); // Write information to the file
fclose($fp); // Close the file
echo “File saved successfully”;
} else {
echo “Error saving file!”;
}[/php]
Please help and, if at all possible, dumb down the suggestion so I can understand.