I have a post data coming from a different page then this php code handles the data and saves it in a text file.
I want the data from $_POST['first'] to be saved if and only if its text ( doesnt contain a numbers or special characters)
<?php
$myfile = fopen("/var/things.txt", "a+");
$txt = "1st:".$_POST['first'];
fwrite($myfile, $txt);
fclose($myfile);
?>
Aucun commentaire:
Enregistrer un commentaire