zero-perfoliate
zero-perfoliate

Author Topic: can i write form results to a file based on variable?  (Read 464 times)

Offline rhysa

  • New PHP Members
  • Posts: 1
  • Karma: +0/-0
can i write form results to a file based on variable?
« on: January 05, 2009, 10:26:19 AM »
hello
I'm trying to use 1 form for multiple event registrations. I have a calendar entry for each event with a link 'regsiter now' which passes the $eventtitle field to the form. So far so good. Now I need to be able to write the form data to a txt file with the $eventtitle variable name. I tried writing to $eventtitle.txt but the flle name ended up as _eventtitle.txt rather than 'conference', 'symposium' etc. Any ideas?

Offline cajhne

  • New PHP Members
  • Posts: 3
  • Karma: +0/-0
Re: can i write form results to a file based on variable?
« Reply #1 on: January 12, 2009, 04:04:51 AM »
Try using:

$new_filename = $eventtitle.".txt"

Then use $new_filename as your file name with no quotes around it.

 

zero-perfoliate