PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
Jonah Bron
DevNet Master
Posts: 2764 Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California
Post
by Jonah Bron » Thu Nov 04, 2010 3:50 pm
Isset(). Don't forget to call session_start at the beginning.
Code: Select all
<?php
session_start();
if (!isset($_SESSION['did_accept'])) {
die('Sorry, your session timed out. Please go back and try again.');
}
if ($_SESSION['did_accept'] != true) {
die('Sorry, there was an error. Please go back and try again.');
}
// ...
?>
mattparsons
Forum Newbie
Posts: 12 Joined: Wed Nov 03, 2010 1:06 pm
Post
by mattparsons » Thu Nov 04, 2010 4:05 pm
not following your last post...does that go in the same php file?
Jonah Bron
DevNet Master
Posts: 2764 Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California
Post
by Jonah Bron » Thu Nov 04, 2010 4:37 pm
No, it goes in page2.url. It answers the question you asked in the previous post.
mattparsons
Forum Newbie
Posts: 12 Joined: Wed Nov 03, 2010 1:06 pm
Post
by mattparsons » Thu Nov 04, 2010 4:40 pm
ok...so that code will supply my security between the 2 pages? If so...where do I post that code?
Jonah Bron
DevNet Master
Posts: 2764 Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California
Post
by Jonah Bron » Thu Nov 04, 2010 4:44 pm
Yes. Place it at the beginning of the file.
mattparsons
Forum Newbie
Posts: 12 Joined: Wed Nov 03, 2010 1:06 pm
Post
by mattparsons » Thu Nov 04, 2010 4:50 pm
ok...that one didn't work...I even cleared my cache...and I can still access url2.html without clicking the "Accept" button on url1.html.
Jonah Bron
DevNet Master
Posts: 2764 Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California
Post
by Jonah Bron » Thu Nov 04, 2010 5:51 pm
Hm. Post the entire code of url1.html.