Jump to content

Need help with this code.


hidra

Recommended Posts

HelpPp

I want to do the following: track a users text inputted into login and password and the info goes to logs.txt, I think i have to use variables for the users inpiut. Please let me have the code just to paste.

 

:

 

<label for="AccountName"> Username:</label>

<input class="textField" type="text" name="AccountName" id=AccountName" /><br />

 

 

 

<label for="Password">Password:</label>

<input class="textField" type="password" name="Password" id="Password" autocomplete="off" /><br />

 

 

 

Thank you.

Link to comment
https://forums.phpfreaks.com/topic/133877-need-help-with-this-code/
Share on other sites

You should try abit harder then that, this isnt just a copy and paste forum for people to just code freely for you.

 

You need to create your file:

$fileName = "logs.txt";
$fh = fopen($fileName, 'w');

 

then you would need to do something like writing

$username = $_POST["accoutname"];
fwrite($fh, $username);

 

 

 

also, if you are dealing with passwords i suggest looking into md5() before you write to your log with the password.

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.