Page 2 of 2

Re: Accept/Decline Button

Posted: Thu Nov 04, 2010 3:50 pm
by Jonah Bron
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.');
}

// ...

?>

Re: Accept/Decline Button

Posted: Thu Nov 04, 2010 4:05 pm
by mattparsons
not following your last post...does that go in the same php file?

Re: Accept/Decline Button

Posted: Thu Nov 04, 2010 4:37 pm
by Jonah Bron
No, it goes in page2.url. It answers the question you asked in the previous post.

Re: Accept/Decline Button

Posted: Thu Nov 04, 2010 4:40 pm
by mattparsons
ok...so that code will supply my security between the 2 pages? If so...where do I post that code?

Re: Accept/Decline Button

Posted: Thu Nov 04, 2010 4:44 pm
by Jonah Bron
Yes. Place it at the beginning of the file.

Re: Accept/Decline Button

Posted: Thu Nov 04, 2010 4:50 pm
by mattparsons
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.

Re: Accept/Decline Button

Posted: Thu Nov 04, 2010 5:51 pm
by Jonah Bron
Hm. Post the entire code of url1.html.