Jump to content

Simple code that works everywhere.


DeathStar

Recommended Posts

HI there.

i would like to know where to find a pice of code that will do the following:

 

All input boxes must be logged into text file(not login scritps)

I want to do it because i have no controll of what users are inputing to it.

I have mysql_real_escape_string() but i dont klnow when its blocking things..

 

Any help would be appreciated!

Link to comment
https://forums.phpfreaks.com/topic/46696-simple-code-that-works-everywhere/
Share on other sites

What you want is to for everytime the user inputs something and submits it writes to a text-file. Try this.

 

$input is your input being submitted. Such as $_POST[input] or w/e.

 

$thingtoadd = "$input";

           

$file = fopen("log.txt", "a");

fwrite($file, $thingtoadd);

fclose($file);

 

Try that, it should do the trick.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.