I've seen a few ideas - figured I'd run it up the flagpole and see if
anyone saluted
>
Thanks in advance
>
No, I only salute the American flag :-)
Not being sure of your experience level, I'll give it a shot.
You need to GET or POST the form to a url. In that url, use the
appropriate $_GET or $_POST value to fetch the contents of the textarea.
Then just open a file, write() the data and close() the file. Of
course, you'll want to ensure you have a unique filename so you don't
keep overwriting it. Or, if you just want to append to the file, ensure
you lock the file before opening for append and unlock it after closing it.
Or, did I not understand your question correctly? Or maybe not answer
with sufficient detail?
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. jstucklex@attgl obal.net
=============== ===
>
>I've seen a few ideas - figured I'd run it up the flagpole and see if
>anyone saluted
Since you are asking in a PHP newsgroup, I assume you are trying to do this
in a PHP program, in which case it's essentially trivial. What have you
tried?
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
The Slippery Hill Boys Tel: 07985 425932. American themed barn dances and bluegrass performances. Stoke on Trent, Newcastle under Lyme, Staffordshire, Cheshire and surrounding areas.
On Aug 5, 4:23 am, Petyr David <phyn...@gmail. comwrote:
I've seen a few ideas - figured I'd run it up the flagpole and see if
anyone saluted
You're basically saying this:
"I have a problem, which I don't care to explain properly, but has
something to do with saving forms to files. Solve it for me."
On Aug 5, 1:38 pm, Krustov <m...@privacy.n etwrote:
>
$james=str_repl ace("<","",$jam es);
$james=str_repl ace(">","",$jam es);
>
Again minor anti abuse stuff that will prevent nasty html code from
being displayed and/or abused .
>
$james=str_repl ace("&","",$jam es);
$james=str_repl ace("#","",$jam es);
>
Would it be faster to use/safer to just user strip_tags ?
>$james=str_rep lace("<","",$ja mes);
>$james=str_rep lace(">","",$ja mes);
>
>Again minor anti abuse stuff that will prevent nasty html code from
>being displayed and/or abused .
Wrong tool at the wrong place.
>$james=str_rep lace("&","",$ja mes);
>$james=str_rep lace("#","",$ja mes);
>
>Some more minor anti abuse stuff .
Same here. It will kill every legit use of these characters. You should
not manipulate the submitted data, but escape it where necessary. The
correct way to prevent cross-site scripting attacks (which are a _major_
threat BTW!) is to use htmlspecialchar s() on data output, not on input.
>
Same here. It will kill every legit use of these characters. You should
not manipulate the submitted data, but escape it where necessary. The
correct way to prevent cross-site scripting attacks (which are a _major_
threat BTW!) is to use htmlspecialchar s() on data output, not on input.
>
Yet another user who only lives to critisise other people posts .
How long has it been since you last posted something useful and actually
helped a user .
>$james=str_rep lace("&","",$ja mes);
>$james=str_rep lace("#","",$ja mes);
>
>Some more minor anti abuse stuff .
>>
>Same here. It will kill every legit use of these characters. You should
>not manipulate the submitted data, but escape it where necessary. The
>correct way to prevent cross-site scripting attacks (which are a _major_
>threat BTW!) is to use htmlspecialchar s() on data output, not on input.
>>
>
>Yet another user who only lives to critisise other people posts .
Wrong.
>How long has it been since you last posted something useful and actually
>helped a user .
4 minutes. Or 20 minutes, if you only take this thread into account.
Your code creates a new problem instead of solving one. I just fixed
your bug.
Some more minor anti abuse stuff .
>
Same here. It will kill every legit use of these characters. You should
not manipulate the submitted data, but escape it where necessary. The
correct way to prevent cross-site scripting attacks (which are a _major_
threat BTW!) is to use htmlspecialchar s() on data output, not on input.
>
Yet another user who only lives to critisise other people posts .
>
Wrong.
>
Your wrong - for people like you tend not to reply to newbies asking
help - unless you can critisise another users post in doing so .
Why else do people like yourself subscribe to what is in effect a help
newsgroup where new users often ask for help .
>$james=str_rep lace("&","",$ja mes);
>$james=str_rep lace("#","",$ja mes);
>
>Some more minor anti abuse stuff .
>>
>Same here. It will kill every legit use of these characters. You should
>not manipulate the submitted data, but escape it where necessary. The
>correct way to prevent cross-site scripting attacks (which are a _major_
>threat BTW!) is to use htmlspecialchar s() on data output, not on input.
>>
>
>Yet another user who only lives to critisise other people posts .
>>
>Wrong.
>>
>
>Your wrong - for people like you tend not to reply to newbies asking
>help - unless you can critisise another users post in doing so .
If I would just want to criticize you, I would have already mentioned
your stupid punctuation (a blank before the period is just wrong) and
your ridiculous introductory epos (newsgroup is obvious and the msgID
is already in the headers, there's no need to repeat them).
But I don't do that.
>Why else do people like yourself subscribe to what is in effect a help
>newsgroup where new users often ask for help .
Often enough I directly respond to an OP's question and post code
snippets if possible. And even in this particular case I indirectly
helped the OP by correcting a bug caused by your own code. Tell me: Of
how much help is a "help" that causes a new problem? The next time the
OP would have complained about not being able to post something about a
company called "Miller & Son". Good work, Mr. K.
But it doesn't really surprise me that you don't have the balls to
accept that your code was "suboptimal ".
>>>>>$james=str _replace("&","" ,$james);
>>>>>$james=str _replace("#","" ,$james);
>>>>>>
>>>>>Some more minor anti abuse stuff .
>>>>Same here. It will kill every legit use of these characters. You should
>>>>not manipulate the submitted data, but escape it where necessary. The
>>>>correct way to prevent cross-site scripting attacks (which are a _major_
>>>>threat BTW!) is to use htmlspecialchar s() on data output, not on input.
>>>>>
>>>Yet another user who only lives to critisise other people posts .
>>Wrong.
>>>
>Your wrong - for people like you tend not to reply to newbies asking
>help - unless you can critisise another users post in doing so .
>
If I would just want to criticize you, I would have already mentioned
your stupid punctuation (a blank before the period is just wrong) and
your ridiculous introductory epos (newsgroup is obvious and the msgID
is already in the headers, there's no need to repeat them).
>
But I don't do that.
>
>Why else do people like yourself subscribe to what is in effect a help
>newsgroup where new users often ask for help .
>
Often enough I directly respond to an OP's question and post code
snippets if possible. And even in this particular case I indirectly
helped the OP by correcting a bug caused by your own code. Tell me: Of
how much help is a "help" that causes a new problem? The next time the
OP would have complained about not being able to post something about a
company called "Miller & Son". Good work, Mr. K.
>
But it doesn't really surprise me that you don't have the balls to
accept that your code was "suboptimal ".
>
Micha
Micha,
Haven't you learned - he never accepts his code as "suboptimal ". It's
always perfect because it's what he uses. And anyone who tries to show
the weaknesses in his code or otherwise make it better gets attacked.
I do agree your way is much better - and safer.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. jstucklex@attgl obal.net
=============== ===
Comment