ZeroPaid.com

  (#1) Old
mcovey Offline
Zeropaid Regular
mcovey Reputation is 650mcovey Reputation is 650mcovey Reputation is 650mcovey Reputation is 650mcovey Reputation is 650mcovey Reputation is 650
 
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  {  }
  
  ?>
a nice small script to respond to the input of a form, and I need to make this happen:

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
   
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

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




vBulletin Skin developed by: vBStyles.com