mercredi 27 juillet 2022

Putting checkbox values into a txt file using PHP

<input id="c1"type="checkbox" name="cq1" value="value1" >


extract($_REQUEST);
$file=fopen("standard.txt","a");

fwrite($file, "Value: \n");

if ($_GET['cq1'] == 'value1') {
    fwrite($file,"Done\n");
    }

fclose($file);
    

I've been trying to get my checkbox values into a txt file but I think somethings wrong with my if statment and I can't find the problem. All the other fwriting works but I think it's something with my checkboxes.




Aucun commentaire:

Enregistrer un commentaire