Whats needed next
-
- Posts: 7
- Joined: Mon Jul 06, 2009 9:40 pm
Re: Whats needed next
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();
?>
<?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();
?>
- hallsofvallhalla
- Site Admin
- Posts: 12026
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Whats needed next
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.
<?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
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.
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.
- Warriorccc0
- Posts: 92
- Joined: Thu Jun 18, 2009 5:37 am
Re: Whats needed next
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.
Anyway, I think I might try these tutorials out tomorrow or sometime.
- hallsofvallhalla
- Site Admin
- Posts: 12026
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Whats needed next
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.killing off creatures in your datavase is wrecking the game's structure slowly which i have found out by testing it.
-
- Posts: 7
- Joined: Mon Jul 06, 2009 9:40 pm
Re: Whats needed next
ty halls im completely new to coding.
- hallsofvallhalla
- Site Admin
- Posts: 12026
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Whats needed next
well i am trying to tailor these tutorials to anyone new to coding. Glad you are learning from them.
- Warriorccc0
- Posts: 92
- Joined: Thu Jun 18, 2009 5:37 am
Re: Whats needed next
Ugh, you need to put the codes, so its not such a trivial thing to copy it by hand.
- hallsofvallhalla
- Site Admin
- Posts: 12026
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Whats needed next
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.
I would just watch all the way up to video 7 then use the code from it.
Re: Whats needed next
Halls, when can we expect the next exciting episode?? im hanging for it....