Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Closed Thread
my bouncer script doesnt work, supposed to kick people out not logged in
Old 04-09-2010, 05:24 PM my bouncer script doesnt work, supposed to kick people out not logged in
Webmaster Talker

Posts: 611
Trades: 0
hi, im using a bouncer.php script to bump people off a page if they arent logged in. its not working. any help greatly appreciated. thanks. derek

here is the bouncer page

Code:
<?php

session_start();// this is a session start declaration call. to let us know we are using sessions on this page.
                  // when you create a session you create an actual file on server that it writes to.
/*echo '<pre>';
print_r($_SESSION);
echo '</pre>';
exit;*//// TO TEST OUTPUT DEBUGGING WHY IT WOULDNT LET ME LOG IN
if(!isset($_SESSION["userid"])){ // why would they be on this page if session is not set!!!! this code is a bouncer..a cop.

    header("Location:index.php"); // if it hasnt been set and they are on this page, hack=y and redirect them back with the naught naughty message.

     
    exit;
}

?>
and here is the page people are restricted from if not logged in

Code:
<?php
include("connect1.php");
include("bouncer.php"); // kicks the person off if session is not set, its the bouncer, big and fat man. ooooh.






?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>oldmastercopies.com</title>
<style type="text/css">
<!--
.style1 {
    font-size: x-large;
    font-weight: bold;
    color: #009966;
}
-->
</style>
</head>

<body>
<div align="center">
  <p>thank you for your purchase!</p>
  <p class="style1">WELCOME TO OLDMASTERCOPIES.COM</p>
  <p>&nbsp;</p>
  <p><strong>OLD MASTER DRAWING TECHNIQUE SERIES</strong></p>
  <p>VIDEO 1 "LINE, 3D SHAPE, AND PERSPECTIVE"</p>
  <p>VIDEO LENGTH: 3 minutes 46 seconds</p>
   <a href="drawing1.asx">Click here to play video</a>
  <p>&nbsp;</p>
</div>
</body>
</html>
silverglade is offline
View Public Profile
 
 
Register now for full access!
Old 04-09-2010, 05:35 PM Re: my bouncer script doesnt work, supposed to kick people out not logged in
Webmaster Talker

Posts: 611
Trades: 0
nevermind i got it to work thanks, this is great
silverglade is offline
View Public Profile
 
Closed Thread     « Reply to my bouncer script doesnt work, supposed to kick people out not logged in
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.21897 seconds with 12 queries