Join us at IRC!
You cannot teach a man anything; you can only help him find it within himself. - Galileo
Friday, May 25, 2012
Navigation
Members Online
Total Online: 33
Web Spiders: 15
Guests Online: 32
Members Online: 1

Registered Members: 70208
Newest Member: andresuran
Latest Articles
View Thread

HellBound Hackers | Computer General | Programming

Author

PHP Coding Help

omnipresence
Member



Posts: 267
Location: USA
Joined: 19.12.04
Rank:
Active User
Posted on 09-07-05 16:45
ok this is what i have so far.


<html>
<body>
<body bgcolor=black>
<br>
<br>
<br>
<br>
<center><font color=white><font size=4> How much dirt is in a hole 6 and a half feet wide, 8 feet deep, and 5 feet long?

<form action="" method="POST">
Answer: <input type="password" name="password" />
<input type="submit" />
</form>

<?php
if($password=='none' {
echo "Good job! You got it correct!<br>\n";
}
else {echo "Nice try, but you need to think more.<br>\n";
}
?>

</font>
</body>
</html>



Now what I want it to do is check to see if the password from the form is none. If it is then to echo "Good job! You got it correct!" But for ome reason I cant get it to work. I think it is a problem with my form but I dont know Im new to integradeing PHP with HTML. Not to mention that this is the first PHP code I have ever written. Anyone with a little advice?
acid_burn4202001
Author

RE: PHP Coding Help

Mr_Cheese
HBH Owner



Posts: 2468
Location: Brighton, UK
Joined: 30.11.04
Rank:
God
Posted on 09-07-05 17:24

<?php
if($password=='none' {
echo "Good job! You got it correct!<br>\n";
}
else {echo "Nice try, but you need to think more.<br>\n";
}
?>


try this...


<?php
if($_POST['password'] = 'none' ) {
echo "Good job! You got it correct!<br>\n";
}
else {
echo "Nice try, but you need to think more.<br>\n";
}
?>





Edited by Mr_Cheese on 09-07-05 19:10
Guest
Username

Password

Remember Me


Bookmark This Page
Affiliates
Adverts

 

 

Links
By using, viewing or obtaining any information contained on this site, you agree to the disclaimer.

© HellBound Hackers 2008- 2009. Since 3rd December 2004.