Page 4 of 10
Re: Whats needed next
Posted: Tue Jul 07, 2009 3:23 am
by coremonster
is this a good logout.php? im a total begginer at this pls help.
<?php
include_once 'connect.php';
session_start();
if (isset($_SESSION['player']))
{
$player=$_SESSION['player'];
}
else
{
echo "Not Logged in <br><br> <A href='login.php'>Login</a>";
exit;
}
$creature=$_GET['creature'];
$playerinfo="SELECT * from players where name='$player'";
$playerinfo2=mysql_query($playerinfo) or die("could not get player stats!");
$playerinfo3=mysql_fetch_array($playerinfo2);
echo "<a href='login.php?'>Login";
exit();
?>
Re: Whats needed next
Posted: Tue Jul 07, 2009 3:33 am
by hallsofvallhalla
where is your actual logout though? you need a session destroy
<?php
session_destroy();
echo " something about logged out";
?>
session destroy is what kills the session when a player is logged in.
Re: Whats needed next
Posted: Tue Jul 07, 2009 5:29 am
by fleaky
Im asking this question as it is around when this could or will happen.
In your script you mension DELETE creature. now thats all good if you wish to never have that creature againbut isn't there away you can just refresh creature or after a kill carry on freely and explore the world maybe?? killing off creatures in your datavase is wrecking the game's structure slowly which i have found out by testing it.
and when is the vid for session 8 coming out ?? i wonder what there is in store for the game.
Re: Whats needed next
Posted: Tue Jul 07, 2009 5:36 am
by Warriorccc0
This forum is pretty unorganized, perhaps you should have a stickied topic that have a organized list of the topics or something?
Anyway, I think I might try these tutorials out tomorrow or sometime.
Re: Whats needed next
Posted: Tue Jul 07, 2009 12:56 pm
by hallsofvallhalla
killing off creatures in your datavase is wrecking the game's structure slowly which i have found out by testing it.
are you talking about FS? I have a cron that re spawns throughout time them but I disabled it due to not actively working on the game. I didnt want the creatures to take over everything.
Re: Whats needed next
Posted: Tue Jul 07, 2009 1:02 pm
by coremonster
ty halls im completely new to coding.
Re: Whats needed next
Posted: Tue Jul 07, 2009 1:52 pm
by hallsofvallhalla
well i am trying to tailor these tutorials to anyone new to coding. Glad you are learning from them.
Re: Whats needed next
Posted: Tue Jul 07, 2009 8:53 pm
by Warriorccc0
Ugh, you need to put the codes, so its not such a trivial thing to copy it by hand.
Re: Whats needed next
Posted: Tue Jul 07, 2009 8:58 pm
by hallsofvallhalla
i missed a few videos, but they are in the video 7 tutorial. I will go back and put the code in where it is missing. I think its only lkike 2 videos though.
I would just watch all the way up to video 7 then use the code from it.
Re: Whats needed next
Posted: Wed Jul 08, 2009 7:18 am
by mrmajic
Halls, when can we expect the next exciting episode?? im hanging for it....