Jump to content
MakeWebGames

Please help! :s


Zan

Recommended Posts

I am going to guess that the code is not placed in the file right.... having the entire code will help. When limiting acess to a file, I like to place it right after where you call globals.php, this way, none of the script runs until that if statement resolves.

Link to comment
Share on other sites

<?php
  include "globals.php";
switch($_GET['step'])
{
case 'index':
casino_index();
break;
default:
casino_index();
break;
}
function casino_index()
{
global $db,$ir,$c,$userid,$h;
$tresder = (int) (rand(100,999));
echo "<table><tr><td><center>
Welcome to the __________  casino. Take a look around and see if there is anything you would like to play.

You have {$ir['casinotokens']} casino tokens.



[url='slotsmachine.php?']> Slots[/url]

[url='arcade.php']> Arcade[/url]

[url='lucky.php']> Lucky Boxes[/url]

[url='slots.php']> 7's and Stripes Slots[/url]

[url='roulette.php']> Roulette[/url]</td>

</tr></table>";
}
$h->endpage();
?> 


 

Here is my casino..i want people to be able to enter this page only when they are level 5

Link to comment
Share on other sites

<?php
  include "globals.php";
 if ( $ir['level'] < 5 ) {
    echo 'You cannot enter this page till your level 5.';
    die($h->endpage());
 }
switch($_GET['step'])
{
case 'index':
casino_index();
break;
default:
casino_index();
break;
}
function casino_index()
{
global $db,$ir,$c,$userid,$h;
$tresder = (int) (rand(100,999));
echo "<table><tr><td><center>
Welcome to the __________  casino. Take a look around and see if there is anything you would like to play.

You have {$ir['casinotokens']} casino tokens.



[url='slotsmachine.php?']> Slots[/url]

[url='arcade.php']> Arcade[/url]

[url='lucky.php']> Lucky Boxes[/url]

[url='slots.php']> 7's and Stripes Slots[/url]

[url='roulette.php']> Roulette[/url]</td>

</tr></table>";
}
$h->endpage();
?>
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...