Jump to content

desjardins

Members
  • Content Count

    12
  • Joined

  • Last visited

Community Reputation

0 Neutral

About desjardins

  • Rank
    Member

Profile Information

  • Gender
    Not Telling
  1. Well the issue for me was that I wasn't using HTTPS rather http - my host helped me figure it out and now it works EVEN with my sloppy code..
  2. This is a two part question... my previous post was surrounding an issue with Sessions, now I was told that it may be a server side issue so I contacted my host provider who said to me that sessions cookies REQUIRE https?? now this can't be valid because I've had no issues with sessions prior to this week - second part of this is, is there something I'm missing with maybe an updated versions? PS: yes, i'm new and simply trying to learn...
  3. and what is normal login system that every other site does?
  4. now I'm curious if it's something with my server because I did a very simple script and it too isn't carrying the session values? <?php session_start(); //set session var $_SESSION['favColor'] = "blue"; $_SESSION['favCat'] = "Stella"; ?> <a href="test2.php">GO TO TEST 2</a> <?php session_start(); //get session vars $favColor = $_SESSION['favColor']; $favCat = $_SESSION['favCat']; echo "My Favorite Color is: " . $favColor . " and my favorite cat is: " . $favCat; ?> <a href="test1.php">Go Back</a>
  5. Ok, so regarding the only have redirect in the same page location, I'm learning here so please.. I actually downloaded a reg and login script... then deleted everything and tried written from scratch.. that script was going from login.php to server.php to handle the server statements, then redirecting back to login.php or index.php... so how am I doing it directly??
  6. Also, $username is set properly because the sql statement uses $username no problem...
  7. No, login_user is checking that the login form was submitted then directly after that I'm setting $username = $_POST['username'];
  8. I know that lol - I just added that line to get my point across - if I removed the header redirect I get the echo, so that tells me the $_SESSION['username'] hold that data I want it too at that point - then when I re add the header redirect the index.php isset($_SESSION['username']) don't trigger meaning the data is gone..
  9. Hey Guys/Gals Benn awhile - so I'm confused on what's happening here. session_start() being called on every page, index.php, registration.php and server.php aswell as login.php. Now when I go too login - if I edit the code to echo the $_SESSION['username'] it works fine - gives me what I expect... I set the $_SESSION['username'] = $username and very next line header('Location: index.php'); this is where the issues is it's loosing the session data and I can't figure out why... so here are the two files if someone can point me in the right direction.. index.php <?php ob_
×
×
  • 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.