This question already has an answer here:
Hey guys i am having a problem coding here. I want a txt file to be created to me when an user submits his name on the html form. But it gives an error in line 5 of this code:
<?php
$name = $_GET['firstname']
$fh = fopen('name.txt', 'a');
fwrite($fh, 'Name: '."".$name ."\n");
fclose($fh);
?>
it gives this error:
Parse error: syntax error, unexpected T_VARIABLE in
/home/a1781682/public_html/action_page.php on line 5
Any help would be appreciated!
Aucun commentaire:
Enregistrer un commentaire