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
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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.