php fopen - name of file

Davie-

New Member
I currently have:\[code\]<?php if (isset($_POST["submitwrite"])) { $handle = fopen("writetest.txt","w+"); if ($handle) { fwrite($handle, "Dan"."?".$_POST["username"]."?".$_POST["pollname"]."?".$_POST["ans1"]."?".$_POST["ans2"]."?".$_POST["ans3"]."?".time()); fclose($handle); } }?>\[/code\]However I need to adjust the filename to be dynamic, instead of 'writetest.txt' I would like it to be: username+pollname+time.txt taking the $_post variables.I would also like to change the directory these files are stored in to /results.Help please...
 
Back
Top