Hi!
I need help with my php page fue to an unknown glitch, heres my code:
[php]
;#@; '@+.
@@@; ;@@@ @@ @@ #@@@@@@# @@@@@@@ @@@@@@@+ @@@@@@@@ @@
@@@@ @@@@ ,@' '@, @@. @ @@` @@ @@ ;@@ @@ @@
@@;@ @;@@ @@ @@ `@: `@: @@ @@ @# @@ @@
@@ @# #@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
@@ @@ @@ @@ .@@@. @@ @@ ,@ @@ ,@ @@ @@
@@ `@..@` @@ @@@ @@ @@ `@ @@ @ @@@@@@@@ @@
@@ @@@@ @@ @ @@ @@ `@ @@ `@ @@ @@
@@ #@@# @@ @ @@ @@ ;@ @@ ;@ @@ @@
@@ @@ @@ @ +@ #@ @@ @@ @@ @@
@@ @@ @@ @ @@ @# `@; @@ '@: @@
@@ @@ @ ,@@ +@ ;@# ,@@ @@ `;@@# @@ @@
@@ @@ @ `@@@@@@` .@@@@@# @@@@@@# @@@@@@@@ @@
–>
Silent Alarm | Contact Us <?php $vone = rand(10,30); #GET RANDOM VARIALBES $vtwo = rand(1,10); $add = rand(1,2); if ($add === 1){ #if $add = 1 $actual = $vone + $vtwo; $input = "{$vone} + {$vtwo}"; $mdit = sha1(sha1(md5($actual))); $hidden = <<<HERE HERE; } else { $actual = $vone - $vtwo; $input = "{$vone} - {$vtwo}"; $mdit = sha1(sha1(md5($actual))); $hidden = <<<HERE HERE;hash(‘ripemd160’, $actual);
}
?>
<?php include ('inc/header.html'); ?>
<div id="all">
<?php require ('inc/navigation.html');?>
<div id="data">
<div id="lp">Contact Us</div>
<div style="font-family: sans-serif; padding-left: 10px;">Have any questions, comments, or concerns? Feel free to contact us with the form below!</div><br />
<form action="postcontact.php" method="post">
<?php
$a = $_REQUEST['a'];
if ($a == 1){
print "<div id=\"wrong\">You have some empty fields!</div>";
} elseif ($a == 2) {
print "<div id=\"wrong\">Wrong Answer to Problem!</div> \n";
}
?>
<!-- <label></label><input type="text" name="" id="" maxlength="25" style="float:left"/> -->
<label>Name</label><input type="text" name="name" id="name" maxlength="25" style="float:left"/>
<label>E-Mail Address</label><input type="text" name="email" id="email" maxlength="50" style="float:left"/>
<label>Verify E-Mail</label><input type="text" name="check" id="check" maxlength="50" style="float:left"/>
<label>Message <div style="color:gray; font-size: 0.7em;">(Max. 500 Characters)</div></label><textarea style="float:left; width: 150px; resize: none; margin-left: 1px; height: 100px;" id="message" name="message" maxlength="500"></textarea>
<label>What's <?php print $input; print $hidden; ?></label><input type="text" name="math" id="math" maxlength="25" style="float:left"/><br />
<label> </label><input type="submit" value="Send Message!" style="float: left;"/>
</form>
</div>
<?php include ('inc/footer.html');?>
</div>
[/php]
Heres the code that links to it:
[php]<?php
Grab Form DAta
$name = trim($_REQUEST[‘name’]);
$email = trim($_REQUEST[‘email’]);
$emailtwo = trim($_REQUEST[‘check’]);
$message = trim($_REQUEST[‘message’]);
$hide = trim($_REQUEST[‘verif’]);
$attempt = trim($_REQUEST[‘math’]);
Check if Empty
if ($name === “” || $email === “” || $emailtwo === “” || $message === “” || $attempt === “”) {
header(‘Location: contact.php?a=1’);
exit;
}
Hash String
$hashed = sha1(sha1(md5($attempt)));
print $hashed;
print $hide;
Check if Hashes Match
#if ($hashed != $hidden) {
header(‘Location: contact.php?a=2’);
exit;
#}
Print this if correct
print 45;
?>[/php]
I will thank you in advance