Hello guys, i got a problem with a script a friend made, what it does is convert values, but you must confirm your ID and PASSWORD, the problem is that the dbo.member table in the database saves password in char(50) format. It means, by default, all passwords are saved with spaces trailing after it in order to make it 50 bytes long. These pages do not add spaces on the submitted password, so even if the password submitted is correct, they are not accepted because it does not have those spaces, and the match fails.
I've been trying to fix it with all sorts of codes, but PHP doesn't seem to like me. Any suggestions?
I've been trying to fix it with all sorts of codes, but PHP doesn't seem to like me. Any suggestions?
Quote: // Get username and password POSTed by input page
if (isset($_POST['gameid'])) { $userName = $_POST['gameid']; }
else { die('Empty fields.'); }
if (isset($_POST['password'])) { $userPass = $_POST['password']; }
else { die('Empty fields.'); }
$s = 50 - strlen($userPass);
// Code here? $s is the number spaces to add.
if (isset($_POST['cashamt'])) { $convAmt = $_POST['cashamt']; }
else { die('Empty fields.'); }