Jump to content

dgs

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

About dgs

  • Birthday 02/28/1993

Contact Methods

  • Website URL
    http://deadlygamingstudios.vlexo.net/

Profile Information

  • Gender
    Male
  • Location
    New Orleans, Louisiana

dgs's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Ohhh, I get it. I'm new to PHP, so I won't understand any of that But thanks, I'll give it a try and tell you how it works out. EDIT:: That did it! Thanks a bunch.
  2. Oh, sorry, here: <?php $username = $_COOKIE['loggedin']; if (!isset($_COOKIE['loggedin'])) die("<p>You are not logged in, <a href='/members/login.html'>click here</a> to login.</p>"); echo "<p>You are logged in as <strong>$username</strong></p>"; ?>
  3. Alright, so, I have this PHP script installed for users to have accounts on my site. There's this code that I put on a page to see if a person is logged in or not. If they aren't, it asks them to, but it also hides everything under that code. I want to be able to put a code on one of my pages to show the user whether they are logged in or not without hiding the rest of the page. How can I do that?
  4. Well, I would do what you suggest, but I'm a complete beginner with PHP and I don't know what any of that means :/
  5. Ah, nevermind, I found out how. setcookie("loggedin", "".$_POST['username']."", time()+(3600 * 24), "/");
  6. I found this line in my login.php page that looks similar to that: setcookie("loggedin", "".$_POST['username']."", time()+(3600 * 24)); Would I change it to something like this?: setcookie("loggedin", "".$_POST['username']."", time()+(3600 * 24, "/"));
  7. There's a few parts to the script. Which part do you want? For the log in, there's the HTML form that submits the log in information, and there's the PHP page that the information gets sent to.
  8. Thank you! I'm new to PHP so I don't know much. Where do I put the "/"?
  9. Alright, so I installed this script that allows users to register to my site and gain access to their own profiles and member's only pages on my site. The problem is: When I put the code that makes the page members only on my page, if you aren't logged in, it asks you to. But even after someone logs in, it still asks them to log in. But that doesn't happen in the directory of the log in page. Alright, so, the log in page is in the directory "/members" of my site. So is the user's profile page. When you go to the profile page not logged in, it asks you to log in. If you do, then the profile page shows your profile. But any page not in the "/members" directory doesn't work with the code. Here's the code to make a page member's only. <?php $username = $_COOKIE['loggedin']; if (!isset($_COOKIE['loggedin'])) die("You are not logged in, <a href='/members/login.html'>click here</a> to login."); echo "You are logged in as <strong>$username</strong>"; ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.