My first post here. I have been searching the forums for my answer and have found things that are close but I can't quite put them together to help myself out...anyway here is my problem.
I am writing a simple dream interpretation program. It has a form with textarea to input your dream and then a submit button. This is sent to a php page for processing.
Here is what I have so far:
The Form Page
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>File Testing</title> </head> <body> <form action="submit.php" method="post" name="dream"> <textarea name="dreamDetail" cols="40" rows="10"></textarea><br /> <input name="Submit" type="submit" value="Interpret Dream" /> </form> </body> </html>
Here is the php page:
<?php $dream = $_POST['dreamDetail']; $words = explode(';', $dream); foreach ($words as $word) ?>Of course this is very incomplete.
What I need to do is be able to search the associative array that is pulled in by _POST and do a word match with a file or a list of words with definitions attached to them.
An example of this can be seen on [a href=\"http://www.freakydreams.com\" target=\"_blank\"]www.freakydreams.com[/a]