• Networking: The investigation is still on the way, we've switched to backup telecom carriers since the episode but we're still working in settling everything as it must be. We'll add more updates as we have them available. Incoming and outgoing emails will be restricted, and user registration has been disabled until the issue is resolved.

Teleport on my CMS! - Fixed now

Status
Not open for further replies.
Junior Spellweaver
Joined
Feb 3, 2007
Messages
167
Reaction score
0
Location
Stockholm, Sweden
Hi!
My teleport function will not work...
What did I wrong?
Here's the php code in the teleport place (Eldeon)
<?php
if(isset($_POST['submit'])) {
$results = mysql_query("SELECT * FROM characters WHERE respawnid = '".$_SESSION['accounts']."' and char_name = '".$_GET['char']."'");
$rows = mysql_fetch_array($results);
if($rows['account_name'] != $_SESSION['accounts']) {
die('This is not your character!');
}
if($rows['char_name'] != $_GET['char']) {
die('This is not your character!');
}
$result = mysql_query("UPDATE characters SET respawnid = '".$_POST['select']."' WHERE char_name = '".$_GET['char']."'");
if(!$result) {
echo('<p class="b01">Cannot teleport!</p>');
} else {
echo('<p class="b01">Teleport successfull!</p>');
}
}
?>
I used the "class changer" place.

Here's a picture too:


It shows that it works but when I start Rose I'm not there I teleported me... HELP!
 
Re: Teleport on my CMS!

PHP:
<?php
if(isset($_POST['submit'])) {
$results = mysql_query("SELECT * FROM characters WHERE account_name = '".$_SESSION['account']."' and char_name = '".$_GET['char']."'");
$rows = mysql_fetch_array($results);
if($rows['account_name'] != $_SESSION['accounts']) {
die('This is not your character!');
}
if($rows['char_name'] != $_GET['char']) {
die('This is not your character!');
}
$result = mysql_query("UPDATE characters SET respawnid = '".$_POST['select']."' WHERE char_name = '".$_GET['char']."'");
if(!$result) {
echo('<p class="b01">Cannot teleport!</p>');
} else {
echo('<p class="b01">Teleport successfull!</p>');
}
}
?>

You had the RESPAWNID select the account name, which will never happen.
 
Re: Teleport on my CMS!

ok thanks. But I have a problem again.
I need a php code so an another page can remember wich character I selected.
Here's a picture of that page:
 
Re: Teleport on my CMS!

no, it has nothing with that to do...I wan't so it's like change job, but instead for change job it's teleporting. But I want a meny first (wich world to choose)...That page (to choose world with) have to remember wich character I choosed before... it's that php code i need
 
Status
Not open for further replies.
Back