Re: Hopiing for some leads as to what may be wrong in this code [message #182258 is a reply to message #182255] |
Thu, 25 July 2013 18:24 ![Go to previous message Go to previous message](/forum/theme/default/images/up.png) ![Go to next message Go to previous message](/forum/theme/default/images/down.png) |
bill
Messages: 310 Registered: October 2010
Karma:
|
Senior Member |
|
|
On 2013-07-25 1:51 PM, Christoph Michael Becker wrote:
> Twayne wrote:
>
>> $code= $_POST["code"];
>> if($_SESSION["d"] !== $code) {
>> echo "<br />You did not enter the correct code: Script halted, ALL
>> data destroyed.<br /> you'll have to go back to the website and start
>> over.<br />";
>> die("Script HALTED, data destroyed");
>> session_destroy();
>> exit();
>> }
>
> You may consider checking the actual values of $code and $_SESSION['d']
> immediately before the if statement (if you don't have a debugger at
> hand, just use a simple var_dump()).
>
> BTW: calling session_destroy() after die() was executed doesn't have any
> effect. You'll want to swap both lines and remove the exit().
>
HUH! You seem to have driven something home! I fixed up the changes you
recommended, tried it, and drew a 500 Error from the server. Put it back
the way it was and still getting a 500 error. It's not definitive, but
it suggest something went seriously wrong.
Thanks for even that much,
Twayne`
|
|
|