(#1)
|
|
Zeropaid Regular
![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,646
Join Date: Feb 2004
Reputation Power: 159
|
help with PHP -- this should be easy -
July 31st, 2004, 10:09 AM
Code:
<?php
if (strpos($_SERVER['HTTP_REFERER'], 'test.php') !== FALSE ) {
if (strpos($_POST['foo'], 'bar') !== FALSE) {
echo "<h1>'bar' is correct!</h1>"; }
elseif (strpos($_POST['foo'], '$ar') !== FALSE) {
echo "<h1>";
echo $_POST['foo'];
echo " rhymes with the right word, at least </h1>"; }
else {
echo "<h1>";
echo $_POST['foo'];
echo " is WRONG</h1>"; }
} else { }
?>
when someone inputs anything that rhymes with bar, like car or star, it will say "well X rhymes." It seems easy, and i know it's not foolproof (like if they put war), but it's my second day of PHP. oh by the way if anyone wants to see the form/page, go to http://metawire.org/~mcovey/test.php |
|
|
|
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| New PHP Site | mp3master1215 | The Lounge | 0 | May 1st, 2004 06:51 PM |
| Need help with PHP | Skeptikal | Windows | 0 | April 21st, 2004 03:00 PM |
| Looking for a filesharing client that's easy to install on Linux | linux7000 | Linux | 3 | January 25th, 2004 04:10 PM |
| How do you get rid of the click noise using easy cd creator? | Explicit | Audio & Video | 4 | November 23rd, 2003 08:05 AM |
| easy way to hide or share ur folder with kazaa | famm | General Discussion | 5 | September 26th, 2003 08:59 PM |










Linear Mode
