You last visited: Today at 19:48
Advertisement
Problems with website, PDO
Discussion on Problems with website, PDO within the Metin2 Private Server forum part of the Metin2 category.
12/18/2016, 23:06
#1
elite*gold: 0
Join Date: Sep 2012
Posts: 12
Received Thanks: 1
Problems with website, PDO
Hello to all,
I have a problem with my server page of the recording, use the PDO libraries.
Practically when I try to register an account says "Account successfully created" but instead did nothing ...
I write the code:
Code:
<?php
include 'config/site.php';
include 'config/db.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<style> [data-sr] { visibility: hidden; } </style>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="<?php print $description; ?>" />
<meta name="author" content="<?php print $auteur; ?>" />
<link rel="shortcut icon" href="<?php print $favicon; ?>">
<!-- Facebook -->
<meta property="og:site_name" content="<?php print $site; ?>"/>
<meta property="og:title" content="<?php print $site; ?>: Inscription"/>
<meta property="og:url" content="<?php print $url; ?>"/>
<meta property="og:type" content="website"/>
<meta property="og:description" content="<?php print $site; ?>: <?php print $description; ?>"/>
<meta property="og:image" content="<?php print $img; ?>"/>
<meta property="og:image:secure_url" content="<?php print $img_secour; ?>"/>
<meta property="og:locale" content="fr_FR"/>
<title><?php print $site; ?> - Inscription</title>
<link rel="shortcut icon" href="favicon.ico">
<!-- Google Fonts -->
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,800,800italic' rel='stylesheet' type='text/css' />
<link href='http://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
<!-- CSS Requis -->
<link type="text/css" rel="stylesheet" href="assets/css/bootstrap.min.css" />
<!-- CSS Plugins -->
<link type="text/css" rel="stylesheet" href="assets/css/font-awesome.min.css" />
<link type="text/css" rel="stylesheet" href="assets/css/animate.css" />
<link type="text/css" rel="stylesheet" href="assets/css/hover.css" />
<link type="text/css" rel="stylesheet" href="assets/css/magnific-popup.css">
<link type="text/css" rel="stylesheet" href="assets/css/jquery.bxslider.css" />
<link type="text/css" rel="stylesheet" href="assets/css/bootstrap-social.css" />
<!-- CSS Theme -->
<link type="text/css" rel="stylesheet" href="assets/css/style.css" />
<!-- Switcher Couleur -->
<link rel="stylesheet" id="switcher-css" type="text/css" href="switcher/css/switcher.css" media="all">
<!-- Couleur -->
<link rel="alternate stylesheet" type="text/css" href="assets/css/theme-blue.css" title="blue" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/css/theme-green.css" title="green" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/css/theme-orange.css" title="orange" media="all" />
</head>
<body class="home-image-banner-full-screen">
<div class="demo_changer">
<div class="demo-icon">
<i class="fa fa-cog fa-spin fa-2x"></i>
</div>
<div class="form_holder">
<h4 class="text-center">Choisis la couleur de ton choix</h4>
<p class="text-center">Couleurs disponible.</p>
<div class="predefined_styles" align="center">
<a href="#" rel="blue" class="styleswitch"><img src="switcher/images/icons/blue.png" alt=""></a>
<a href="#" rel="green" class="styleswitch"><img src="switcher/images/icons/green.png" alt=""></a>
<a href="#" rel="orange" class="styleswitch"><img src="switcher/images/icons/orange.png" alt=""></a>
</div>
<div class="clearfix"></div>
</div>
</div>
<div class="navbar navbar-magnet navbar-fixed-top" role="navigation" id="navbar-main-magnet">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"><i class="fa fa-bars"></i></button>
<!-- Logo -->
<a class="navbar-brand" href="index"><img src="images/logo.png" alt="Magnet" /></a>
<!-- /Logo -->
</div>
<!-- Navigation -->
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<!-- Accueil -->
<li><a href="index">Accueil </a></li>
<!-- Inscription -->
<li><a href="inscription" class="curent">Inscription </a></li>
<!-- Téléchargement -->
<li><a href="telechargement">Téléchargement </a></li>
<!-- Classement -->
<li><a href="classement">Classement </a></li>
<!-- Forum -->
<li><a href="forum/">Forum </a></li>
<!-- Compteur -->
<li><a href="#" class="curent"><?php if($online_players) {
print '<div id="sec_down">';
$result = $player->prepare("SELECT count(*) FROM player WHERE DATE_SUB(NOW(), INTERVAL $update_players MINUTE) < last_play");
$result->execute();
$number_of_rows = $result->fetchColumn();
print $number_of_rows.' connecté(s)';
print '</div>';
}
?></a></li>
</ul>
</div>
<!-- Fin Navigation -->
</div>
<div class="clearfix"></div>
</div>
<div class="jumbotron" style="background:url('images/slide-2.jpg') no-repeat 0 0 #ffffff;background-size:cover;background-position:center center">
<div class="container">
<h2 style="color: white" class="block-title">INSCRIPTION À <?php print $site; ?></h2>
</div>
</div>
<center>
<div class="section bg-white">
<div class="container">
<div class="info-box">
<?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">Nom d\'utilisateur indisponible.</font></center>
</div>';
else if($check_email>0)
print '<div class="headline">
<center><font color="red">L\'email est déjà utilisé.</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,
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,
: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(':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();
print '<div class="headline">
<center><font color="green">Votre compte a été créé avec succès.</font></center>
</div>';
}
else
print '<div class="headline">
<center><font color="red">Les mots de passe ne sont pas identique.</font></center>
</div>';
}
else
print '<div class="headline">
<center><font color="red">L\'adresse email est indisponible.</font></center>
</div>';
}
}
?>
<form name="contact-form" method="post" action="#">
<div class="form-group"><input type="text" maxlength="16" name="username" required="required" class="form-control" placeholder="Nom d'utilisateur" /></div>
<div class="form-group"><input type="email" required="required" name="email" class="form-control" placeholder="Adresse email" /></div>
<div class="form-group"><input type="password" required="required" name="pw" class="form-control" placeholder="Mot de passe" /></div>
<div class="form-group"><input type="password" required="required" name="repeat_pw" class="form-control" placeholder="Répète-le" /></div>
<div class="form-action"><input type="submit" name="submit" value="Valider mon inscription" class="btn btn-primary-magnet btn-block btn-lg" /></div>
</form>
<?php
}
else
print '<div class="headline">
<center><font color="red">Les inscriptions sont actuellement désactivé.</font></center>
</div>';
?>
</div>
<div id="back_to_top">
<div class="container">
<a href="#"><i class="ic ic-angle-up-white"></i></a>
</div>
</div>
<script type="text/javascript" src="assets/js/jquery-1.10.2.min.js"></script>
<!-- Bootstrap -->
<script type="text/javascript" src="assets/js/bootstrap.min.js"></script>
<!-- Plugins -->
<script type="text/javascript" src="assets/js/modernizr-2.6.2.min.js"></script>
<script type="text/javascript" src="assets/js/imagesloaded.pkgd.min.js"></script>
<script type="text/javascript" src="assets/js/isotope.pkgd.min.js"></script>
<script type="text/javascript" src="assets/js/jquery.smartmenus.min.js"></script>
<script type="text/javascript" src="assets/js/jquery.smartmenus.bootstrap.min.js"></script>
<script type="text/javascript" src="assets/js/scrollReveal.js"></script>
<script type="text/javascript" src="assets/js/jquery.magnific-popup.js"></script>
<script src="switcher/js/dmss.js"></script>
<script type="text/javascript" src="assets/js/magnet-main.js"></script>
<script type="text/javascript" src="assets/js/carousel-animations.js"></script>
<script>
var config = {
reset: false,
delay: 'onload',
vFactor: 0.90,
mobile: false
}
window.sr = new scrollReveal(config);
$('.gallery-link').magnificPopup({
type: 'image',
gallery:{enabled:true}
});
</script>
</body>
</html>
Days is that there are below, and I do not find solutions I hope some of you can help me...
Ps: Sorry my English..
12/19/2016, 14:51
#2
elite*gold: 4
Join Date: Aug 2016
Posts: 47
Received Thanks: 36
Add me on Skype: live:bently_29
Similar Threads
[Buying] Fix Website coding problems!
01/04/2014 - Trading - 0 Replies
Title says everything, please contact with me through skype: knox.travian
conquer website problems
09/18/2012 - CO2 Private Server - 2 Replies
Hello, i got an error when i try to go on the site from another computer it wont load,
what ive done is am useing mysql to host the db of my server and am using appserv to host the website, but on appserv am using the mysql from it, i have all my site files under www/co/... and it never works
[HELP]WEBSITE PROBLEMS
09/19/2010 - EO PServer Hosting - 1 Replies
http://i1207.photobucket.com/albums/bb479/DeadHack erz/12.jpg
hello guys whats wrong with this anyone know?
Co website problems
12/30/2006 - Conquer Online 2 - 6 Replies
Just wondering if anyone else has been having problem with co's website loading the bulitens and tips and storys and such
All times are GMT +2. The time now is 19:48 .