Log in

View Full Version : [PHP] What's wrong with this?



.:.:jjm261:.:.
22-02-2009, 12:11 AM
} else if ($mthd == "ecpdeactivate") {
?>
<form method="post" action="index.php?act=site&mthd=ecpdeactivate2">
<input type="text" name="codeword" id="codeword">
<input type="submit" value="submit">
</form>
<?php
} else if ($mthd == "ecpdeactivate2") {

$codewordmd5 = d41d8cd98f00b204e9800998ecf8427e;
$codeword =$_post['codeword'];
if (md5($codeword)!== $codewordmd5) {
echo "Wrong. Soz 'ard"; } else { echo "genius!";

}

}



Anybody?

Source
22-02-2009, 12:19 AM
alot. We need the full script to be of anyhelp, in its current form nothing makes sense. We'll help when we have something we can work with :)

.:.:jjm261:.:.
22-02-2009, 12:21 AM
That's the only place in the code which is causing me problems.. every other feature works.. just not that simple if statement.

scottish
22-02-2009, 12:27 AM
And the error is? or is it just generally not working?

.:.:jjm261:.:.
22-02-2009, 12:28 AM
Sorry.. Forgot to mention.. It's the script what is not working.. There are no errors showing up

Dentafrice
22-02-2009, 06:18 PM
Simply telling us that "it doesn't work", isn't going to help us diagnose the problem.

What is it displaying? Is there any output at all? Come on. ;P

.:.:jjm261:.:.
22-02-2009, 08:35 PM
Thanks for the attempts at help.. but somehow i managed to fix it myself... i don't quite remember what i did, but now it's working

;D

Blob
26-02-2009, 05:12 PM
theres a space between else and if...

Dentafrice
27-02-2009, 02:17 AM
theres a space between else and if...
That doesn't matter.

That only matters when you're not using curly braces.

Want to hide these adverts? Register an account for free!