Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
HabboPixel - Login/Register Help
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Higoka" data-source="post: 454503" data-attributes="member: 83624"><p>if you look at the PDO::query description:</p><p>[CODE=php]public PDO::query ( string $statement ) : PDOStatement[/CODE]</p><p>you see that it doesn't allow more than 1 argument.</p><p></p><p>in your code however:</p><p>$bdd3 = $pdo->query('INSERT INTO users (username, password, mail, credits, vip_points, activity_points, look, motto, account_created, ip_reg) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'<strong>, [$core->F_HTML($_POST['username']), $core->C_PASS($_POST['password']), $core->F_HTML($_POST['email']), "0", "0", "0", "ch-235-92.sh-295-92.hr-3163-61.hd-180-1.lg-275-92", "Nouveau !", time(), $_SERVER['REMOTE_ADDR']]</strong>);</p><p></p><p>you have more than 1 argument so this is probably your problem why it doesn't execute the query.</p><p>try and change it to this:</p><p>[CODE=php]</p><p>$bdd3 = $pdo->prepare('INSERT INTO users (username, password, mail, credits, vip_points, activity_points, look, motto, account_created, ip_reg) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)');</p><p>$bdd3->execute([$core->F_HTML($_POST['username']), $core->C_PASS($_POST['password']), $core->F_HTML($_POST['email']), "0", "0", "0", "ch-235-92.sh-295-92.hr-3163-61.hd-180-1.lg-275-92", "Nouveau !", time(), $_SERVER['REMOTE_ADDR']]);</p><p>[/CODE]</p><p></p><p></p><p></p><p>and your <strong>SELECT</strong> statements also probably doesn't get executed:</p><p>[CODE=php]</p><p>$bdd = $pdo->query('SELECT id FROM users WHERE username = ?', [$core->F_HTML($_POST['username'])]);</p><p></p><p>$bdd2 = $pdo->query('SELECT id FROM users WHERE mail = ?', [$core->F_HTML($_POST['email'])]);</p><p>[/CODE]</p><p></p><p>change to this:</p><p>[CODE=php]</p><p>$bdd = $pdo->prepare('SELECT id FROM users WHERE username = ?');</p><p>$bdd->execute([$core->F_HTML($_POST['username'])]);</p><p></p><p>$bdd2 = $pdo->prepare('SELECT id FROM users WHERE mail = ?');</p><p>$bdd2->execute([$core->F_HTML($_POST['email'])]);[/CODE]</p></blockquote><p></p>
[QUOTE="Higoka, post: 454503, member: 83624"] if you look at the PDO::query description: [CODE=php]public PDO::query ( string $statement ) : PDOStatement[/CODE] you see that it doesn't allow more than 1 argument. in your code however: $bdd3 = $pdo->query('INSERT INTO users (username, password, mail, credits, vip_points, activity_points, look, motto, account_created, ip_reg) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'[B], [$core->F_HTML($_POST['username']), $core->C_PASS($_POST['password']), $core->F_HTML($_POST['email']), "0", "0", "0", "ch-235-92.sh-295-92.hr-3163-61.hd-180-1.lg-275-92", "Nouveau !", time(), $_SERVER['REMOTE_ADDR']][/B]); you have more than 1 argument so this is probably your problem why it doesn't execute the query. try and change it to this: [CODE=php] $bdd3 = $pdo->prepare('INSERT INTO users (username, password, mail, credits, vip_points, activity_points, look, motto, account_created, ip_reg) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'); $bdd3->execute([$core->F_HTML($_POST['username']), $core->C_PASS($_POST['password']), $core->F_HTML($_POST['email']), "0", "0", "0", "ch-235-92.sh-295-92.hr-3163-61.hd-180-1.lg-275-92", "Nouveau !", time(), $_SERVER['REMOTE_ADDR']]); [/CODE] and your [B]SELECT[/B] statements also probably doesn't get executed: [CODE=php] $bdd = $pdo->query('SELECT id FROM users WHERE username = ?', [$core->F_HTML($_POST['username'])]); $bdd2 = $pdo->query('SELECT id FROM users WHERE mail = ?', [$core->F_HTML($_POST['email'])]); [/CODE] change to this: [CODE=php] $bdd = $pdo->prepare('SELECT id FROM users WHERE username = ?'); $bdd->execute([$core->F_HTML($_POST['username'])]); $bdd2 = $pdo->prepare('SELECT id FROM users WHERE mail = ?'); $bdd2->execute([$core->F_HTML($_POST['email'])]);[/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
HabboPixel - Login/Register Help
Top