Can anyone spot the error in this php code?

r.kasm

New member
Hi,
I've been working on this for a bit and I can't seem to find the errors it's telling me.

This is the html form:

<form name="web_form" id="web_form" method="post" action="process-form-data.php">
<p><label>Enter name: </label><input type="text" name="name" id="name" /></p>
<p><label>Enter email: </label><input type="text" name="email" id="email" /></p>
<p><input type="submit" name="s1" id="s1" value="Submit" /></p>
</form>

and this is the php file:

<?php
$name = $_POST['name'];
$email = $_POST['email'];
$fp = fopen(”formdata.txt”, “a”);
$savestring = .$name .$email . “n”;
fwrite($fp, $savestring);
fclose($fp);
?>


The errors I'm getting are:

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in ... on line 8

Parse error: syntax error, unexpected T_VARIABLE in ... on line 9


TIA
 
Back
Top