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
Send user into a room depending on url, url/client?room=X
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="Berk" data-source="post: 448353" data-attributes="member: 63611"><p>Try this:</p><p>[CODE=php]<?php</p><p>if(isset($_GET['room']))</p><p>{</p><p> $roomid = mysql_real_escape_string($_GET['room']);</p><p> mysql_query("UPDATE users SET home_room = '". $roomid ."' WHERE id = '".$_SESSION['user']['id']."'");</p><p> // optional, uncomment if you wish.</p><p> //echo "<script>alert('Forwarded you to room ' + ". $roomid .")</script>";</p><p>}</p><p>?>[/CODE]</p><p>Add this to your client.php</p><p><strong>Note</strong>: I've done this for rev, if you want you can edit the $_SESSION['user']['id'] part corresponding to your session variable.</p><p><strong>Note 2</strong>: This might be vulnerable to injection, use PDO instead.</p></blockquote><p></p>
[QUOTE="Berk, post: 448353, member: 63611"] Try this: [CODE=php]<?php if(isset($_GET['room'])) { $roomid = mysql_real_escape_string($_GET['room']); mysql_query("UPDATE users SET home_room = '". $roomid ."' WHERE id = '".$_SESSION['user']['id']."'"); // optional, uncomment if you wish. //echo "<script>alert('Forwarded you to room ' + ". $roomid .")</script>"; } ?>[/CODE] Add this to your client.php [B]Note[/B]: I've done this for rev, if you want you can edit the $_SESSION['user']['id'] part corresponding to your session variable. [B]Note 2[/B]: This might be vulnerable to injection, use PDO instead. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Send user into a room depending on url, url/client?room=X
Top