GNU nano 2.2.3 File: testcode.php
<html>
<body>
<?php
if(isset($_POST['submitxyz']))
{
$code=$_POST["fcheat"];
function checkcheat()
{
if ($code=="rockon87")
{
$cheat=="Godmode";
$check==1;
$invalid==0;
display();
}
else
{
$cheat==" ";
$check==0;
$invalid==1;
display();
}
}
function display()
{
if (invalid==0)
{
echo "You have been granted " . $cheat;
}
else
{
echo "That is not a valid cheat code";
}
}
$code=$_POST["fcheat"];
checkcheat();
}
else
{
?>
<form action="cheatcode.php" name="submitxyz" method="postt">
Cheat: <input name="fcheat" type="text" />
<input type="submit" />
</form>
</body>
</html>
I did what you suggested and now its screaming at me
Parse error: syntax error, unexpected ';', expecting '{' in /home2/lawshzco/public_html/techyme/trey/testcode.php on line 7