FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Hopiing for some leads as to what may be wrong in this code
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Hopiing for some leads as to what may be wrong in this code [message #182259 is a reply to message #182256] Thu, 25 July 2013 18:31 Go to previous messageGo to previous message
Christoph Michael Bec is currently offline  Christoph Michael Bec
Messages: 207
Registered: June 2013
Karma:
Senior Member
Twayne wrote:

> 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()).
>
> It's interesting, but I did. A rev back I had an echo for "code" and
> Session(... and it prints them just before it throws the error message.

And both had exactly the same value (a leading or trailing space, for
instance, make a big difference here) and the same *type*? Then the
body of the if statement won't be executed.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Adding (Add - Subtract) values from two different tables to another table
Next Topic: fetch items from a row
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Feb 19 20:32:44 GMT 2025

Total time taken to generate the page: 0.05158 seconds