i m trying to find out which method would be the best to create a:

that the client can build and add field as wanted.
with submit button. (for me to recieve)
with convert to downloadable pdf,txt,doc. (for them to backup)

it's for the client to build his Q&A form that could be as long as he want and that i could fill up for him.

it seems pretty simple but i can't find anything similar?!@!

i was thinking flash..but i find it complicated to mix html and flash...

PHP must be a lot simpler but i m not to good at it!!!

any help, ex, tut?


8 Years
Discussion Span
Last Post by sDJh

for a good tut hav a look on php.net. It's the best documented site for php in the net.

the form is done in html

<form method=post action="save.php">
Your name:<br>
<input type=text name="name"><br><br>
Your email:<br>
<input type=text name="email">

This code sends the data to save.php. In PHP you can get the variables like this:


Saving that stuff in txt:


For PDF you can find a library on php.net. Doc maybe as well, but I'm not sure.

If you want to have a variable form you can make up you own stylesheet. Eg: style.stl

Your family-name|name|text
Your christian-name|cname|text
Your email-address|email|text
Your password|password|password
Your comment|comment|textarea

Read the lines from that file (have a look in a tut, I'm too lazy in the moment to explain) and explode them (see next example). With simple conditions you can style your output.

In save.php you do basically something like:

fwrite($f2,$t[1].": ".$_REQUEST[$t[1]]."\n");

this code recieves the variable-names from your form ($f) and saves it with the data in "output.txt" ($f2).

I hope this helps. If not, than ask again.

This article has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.