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
Does not Redirect after register
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="gochad" data-source="post: 464710" data-attributes="member: 84522"><p>Hey so i got an custom RevCMS, and when you click submit the account gets created but you dont get redirected and you stay on same page, i can share a snippet of the code when its success but it does not redirect i have tried adding header("Location: home.php");</p><p>but it does not work</p><p></p><p></p><p>[SPOILER="Code"]</p><p><?php</p><p>require_once('../../includes/config.php');</p><p>require_once('../../includes/functions.php');</p><p>require_once('../../includes/websockets.php');</p><p>require_once('../class/database.php');</p><p></p><p>// Services</p><p>$db = new Database();</p><p></p><p>// Vérification connecté</p><p>session_start();</p><p>if(!isset($_SESSION['register'])) {</p><p> if(empty($_POST['rusername']) OR empty($_POST['remail']) OR empty($_POST['rpassword']) OR empty($_POST['rpassword_confirm'])) </p><p> {</p><p> echo "LeereFelder";</p><p> return;</p><p> }</p><p></p><p> if(strlen($_POST['rusername']) < 4) {</p><p> echo "MinUsername";</p><p> return;</p><p> }</p><p> </p><p> if(strlen($_POST['rusername']) > 11) {</p><p> echo "MaxUsername";</p><p> return;</p><p> }</p><p> </p><p> if(!ctype_alnum($_POST['rusername'])) {</p><p> echo "InvalidUsername";</p><p> return;</p><p> }</p><p></p><p> </p><p> if(mb_strtoupper($_POST['rusername']) == "ADMIN" OR mb_strtoupper($_POST['rusername']) == "MOD" OR mb_strtoupper($_POST['rusername']) == "ARCHITECTE") {</p><p> echo "PrefixUsername";</p><p> return;</p><p> }</p><p></p><p> $username = $_POST['rusername'];</p><p> $check_username = $db->executeQuery('SELECT COUNT(*) AS count_row FROM users WHERE username=?', array($username));</p><p> if($check_username[0]["count_row"] == 1)</p><p> {</p><p> echo "UsedUsername";</p><p> return;</p><p> }</p><p></p><p> if(!filter_var($_POST['remail'], FILTER_VALIDATE_EMAIL)) {</p><p> echo "InvalidEmail";</p><p> return;</p><p> }</p><p> </p><p> $checkDoubleAccount = $db->executeQuery('SELECT COUNT(*) AS count_row FROM users WHERE ip_last=?', array($_SERVER['REMOTE_ADDR']));</p><p> if($checkDoubleAccount[0]["count_row"] >= $RegisterAccounts)</p><p> {</p><p> echo "DoubleAccount";</p><p> return;</p><p> }</p><p> </p><p> $check_email = $db->executeQuery('SELECT COUNT(*) AS count_row FROM users WHERE mail=?', array($_POST['remail']));</p><p> if($check_email[0]["count_row"] == 1)</p><p> {</p><p> echo "UsedEmail";</p><p> return;</p><p> }</p><p></p><p> if(strlen($_POST['rpassword']) < 6) {</p><p> echo "MinPasswort";</p><p> return;</p><p> }</p><p> </p><p> if($_POST['rpassword'] != $_POST['rpassword_confirm']) {</p><p> echo "DifferentPasswort";</p><p> return;</p><p> }</p><p></p><p> if($RegisterEnabled == false){</p><p> echo "Registerfalse";</p><p> return;</p><p> }</p><p> </p><p> $motto = $RegisterMotto;</p><p> $gender = "M";</p><p> $look = "hr-3090-61.lg-280-110.hd-180-2.ch-215-49.sh-290-110";</p><p></p><p> $sessionKey = $configName.'-'.rand(9,999).'/'.substr(sha1(time()).'/'.rand(9,9999999).'/'.rand(9,9999999).'/'.rand(9,9999999),0,33);</p><p> $timestamp = strtotime(date("Y-m-d H:i:s"));</p><p> $db->executeInsert('INSERT INTO users (username, password, mail, credits, activity_points, vip_points, auth_ticket, look, gender, motto, account_created, ip_last, ip_reg, home_room, mutuelle_expiration, telForfaitReset) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, NOW(), NOW())', array($username, password_hash($_POST['rpassword'], PASSWORD_BCRYPT), $_POST['remail'], $RegisterTaler, $RegisterDuckets, $RegisterDiamanten, $sessionKey, $look, $gender, $motto, $timestamp, userIp(), userIp(), $RegisterHomeRoom));</p><p> }</p><p></p><p>?></p><p></p><p>[/SPOILER]</p><p>[automerge]1602955949[/automerge]</p><p>if you want payment i can pay...</p></blockquote><p></p>
[QUOTE="gochad, post: 464710, member: 84522"] Hey so i got an custom RevCMS, and when you click submit the account gets created but you dont get redirected and you stay on same page, i can share a snippet of the code when its success but it does not redirect i have tried adding header("Location: home.php"); but it does not work [SPOILER="Code"] <?php require_once('../../includes/config.php'); require_once('../../includes/functions.php'); require_once('../../includes/websockets.php'); require_once('../class/database.php'); // Services $db = new Database(); // Vérification connecté session_start(); if(!isset($_SESSION['register'])) { if(empty($_POST['rusername']) OR empty($_POST['remail']) OR empty($_POST['rpassword']) OR empty($_POST['rpassword_confirm'])) { echo "LeereFelder"; return; } if(strlen($_POST['rusername']) < 4) { echo "MinUsername"; return; } if(strlen($_POST['rusername']) > 11) { echo "MaxUsername"; return; } if(!ctype_alnum($_POST['rusername'])) { echo "InvalidUsername"; return; } if(mb_strtoupper($_POST['rusername']) == "ADMIN" OR mb_strtoupper($_POST['rusername']) == "MOD" OR mb_strtoupper($_POST['rusername']) == "ARCHITECTE") { echo "PrefixUsername"; return; } $username = $_POST['rusername']; $check_username = $db->executeQuery('SELECT COUNT(*) AS count_row FROM users WHERE username=?', array($username)); if($check_username[0]["count_row"] == 1) { echo "UsedUsername"; return; } if(!filter_var($_POST['remail'], FILTER_VALIDATE_EMAIL)) { echo "InvalidEmail"; return; } $checkDoubleAccount = $db->executeQuery('SELECT COUNT(*) AS count_row FROM users WHERE ip_last=?', array($_SERVER['REMOTE_ADDR'])); if($checkDoubleAccount[0]["count_row"] >= $RegisterAccounts) { echo "DoubleAccount"; return; } $check_email = $db->executeQuery('SELECT COUNT(*) AS count_row FROM users WHERE mail=?', array($_POST['remail'])); if($check_email[0]["count_row"] == 1) { echo "UsedEmail"; return; } if(strlen($_POST['rpassword']) < 6) { echo "MinPasswort"; return; } if($_POST['rpassword'] != $_POST['rpassword_confirm']) { echo "DifferentPasswort"; return; } if($RegisterEnabled == false){ echo "Registerfalse"; return; } $motto = $RegisterMotto; $gender = "M"; $look = "hr-3090-61.lg-280-110.hd-180-2.ch-215-49.sh-290-110"; $sessionKey = $configName.'-'.rand(9,999).'/'.substr(sha1(time()).'/'.rand(9,9999999).'/'.rand(9,9999999).'/'.rand(9,9999999),0,33); $timestamp = strtotime(date("Y-m-d H:i:s")); $db->executeInsert('INSERT INTO users (username, password, mail, credits, activity_points, vip_points, auth_ticket, look, gender, motto, account_created, ip_last, ip_reg, home_room, mutuelle_expiration, telForfaitReset) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, NOW(), NOW())', array($username, password_hash($_POST['rpassword'], PASSWORD_BCRYPT), $_POST['remail'], $RegisterTaler, $RegisterDuckets, $RegisterDiamanten, $sessionKey, $look, $gender, $motto, $timestamp, userIp(), userIp(), $RegisterHomeRoom)); } ?> [/SPOILER] [automerge]1602955949[/automerge] if you want payment i can pay... [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Does not Redirect after register
Top