Jump to content

kinks

Members
  • Posts

    20
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Male

kinks's Achievements

Member

Member (2/5)

0

Reputation

  1. Well; I was hoping on allowing users to get 'genotype tests' so, users can view the genetics; but I don't think I will, so that way I can make it wasier on myself.
  2. Okay. In my MySQL databse, I have my users table, and I want a 'last login' for each user. How can I make it register each person's last login?
  3. I would like to use if statements to create the code (not that I can think of any other way). because once someone selects their two rabbits and hits "breed" I want it to view this code quickly and determine the genetics. Even though it will be more complicated to make that possible.
  4. OKay. I am stuck, and need help. I'm making a site where you raise and shoe 'virtual rabbits.' I'm trying to figure out the color genetics script. Let's give this scenario: I breed a black colored rabbit, his genetics are: aaB_C_D_E_ So, I breed the black with a Chocolate genetics: aabb_C_D_E_ The black gene, in this case, is the dominant gene (keep in mind both these have 'no' other genetics with them. Just for scenario reasons) So, let's say they breed, and 5 rabbits are born. The bulk of those rabbits are Black, but they carry the chocolate gene with them, and have a 1 in 3 chance of being chocolate. I was trying to write it using 'if' statements, but got stuck Help?
  5. Now, I hate to be an @$$ but. I have now learned sessions is better. I have: if((!isset($_SESSION['id'])) || (!isset($_SESSION['username'])) || (!isset($_SESSION['password']))) { unset($_SESSION['username']); unset($_SESSION['password']); unset($_SESSION['id']); $loggedin = 0; } else { $loggedin = 1; } in connect.php What exactly needs to be in the login script make that function correctly?
  6. What about one WITHOUT defining everything?
  7. I need to make my users stay logged in once they actual log in. Preferably, using cookies. I just need help figuring it out. $Session_cookies....or something. Gosh, I'm such a newbie.
  8. In all my coding, I never even thought about HOW to do session lengths or anything. So; when the user logs in I want them to STAY logged in, if active, if not, I want the user to be logged in for 30 minutes... Now another thing...this goes in the 'connect.php' correct?
  9. Okay, I changed up my register and log in file stuff, so, I need a new code for "OOPS! You cannot view this page, you are not logged in!" I use: $loggedin = 0; } else { $loggedin = 1; } So, what should the if statement look like?
  10. Well; I'm stuck. How do I get my forum to automatically recognize the user when they post, so we don't have to type in our name and whatnot.
  11. I used <?php session_start(); if(!isset($_SESSION['my_session_variable'])){ die("You cannot view this page, you are not logged in!"); } ?> BUT, it displays the message for logged in users as well.
  12. So, I have all of my user stuff set-up, login, register, databases, tables, etc, etc. How do I do a simple PHP code or script that disables page view if not logged in?
  13. kinks

    User Page

    Why don't you develope/test your code off line. You can install PHP locally saves alot of time. Look into using wampserver or xampp Yeah...I am installing WAMP soon Thank you!
×
×
  • 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.