Hello guys, ive got a problem on my script and i cant figure out a solution.
This is my script
[php] <?php
if($register) {
if (isset($_POST[‘username’])) {
$check_login = $account->prepare(“SELECT count(*) FROM account WHERE login = '”.$_POST[‘username’]."’");
$check_login->execute();
$check_login = $check_login->fetchColumn();
$check_email = $account->prepare("SELECT count(*) FROM account WHERE email = '".$_POST['email']."'");
$check_email->execute();
$check_email = $check_email->fetchColumn();
if($check_login>0)
print '<div class="headline">
<center><font color="red">Nome utilizzato, non disponibile.</font></center>
</div>';
else if($check_email>0)
print '<div class="headline">
<center><font color="red">Questa email è utilizzata da un altro account</br></br></font></center>
</div>';
else {
if(filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) {
if($_POST['pw'] == $_POST['repeat_pw']) {
$hash = "*" . sha1(sha1($_POST['pw'], true));
$password = strtoupper($hash);
if($bonus)
$expire = "20221218131717";
else
$expire = "0";
$sql = "INSERT INTO account(login,
password,
social_id,
email,
create_time,
status,
gold_expire,
silver_expire,
safebox_expire,
autoloot_expire,
fish_mind_expire,
marriage_fast_expire,
money_drop_rate_expire) VALUES (
:login,
:password,
:social_id,
:email,
NOW(),
:status,
:gold_expire,
:silver_expire,
:safebox_expire,
:autoloot_expire,
:fish_mind_expire,
:marriage_fast_expire,
:money_drop_rate_expire)";
$stmt = $account->prepare($sql);
$stmt->bindParam(':login', $_POST['username'], PDO::PARAM_STR);
$stmt->bindParam(':password', $password, PDO::PARAM_STR);
$stmt->bindParam(':social_id', $_POST['delcode'], PDO::PARAM_STR);
$stmt->bindParam(':email', $_POST['email'], PDO::PARAM_STR);
$stmt->bindParam(':status', $status_register, PDO::PARAM_STR);
$stmt->bindParam(':gold_expire', $expire, PDO::PARAM_STR);
$stmt->bindParam(':silver_expire', $expire, PDO::PARAM_STR);
$stmt->bindParam(':safebox_expire', $expire, PDO::PARAM_STR);
$stmt->bindParam(':autoloot_expire', $expire, PDO::PARAM_STR);
$stmt->bindParam(':fish_mind_expire', $expire, PDO::PARAM_STR);
$stmt->bindParam(':marriage_fast_expire', $expire, PDO::PARAM_STR);
$stmt->bindParam(':money_drop_rate_expire', $expire, PDO::PARAM_STR);
$stmt->execute();[/php]
But when i register the database (account.account) doesnt receive the data i input, what can i do to fix this? Thanks in advance