| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| NamePros Regular Join Date: Jun 2003 Location: California
Posts: 245
![]() | PHP Array Search Ok I am asking for someone to please look this over: PHP Code: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> Class Searcher</TITLE> </HEAD> <BODY> <FORM METHOD="POST" ACTION="subjectsarray.php"> Search for:<INPUT TYPE="TEXT" NAME="search"> <INPUT TYPE="SUBMIT" VALUE="Search"> </FORM> </BODY> </HTML> ????: NamePros.com http://www.namepros.com/programming/15455-php-array-search.html Searching for a match with Calculus Searching for a match with Biology Searching for a match with Study Skills School Success is one of my classes. But what it prints is: Searching for a match with Calculus Searching for a match with Biology Searching for a match with Study Skills Searching for a match with Band Searching for a match with English Searching for a match with PE However, the similar code: PHP Code: Works just fine. Anyone know what I am doing wrong?
__________________ --Alpha |
| |
| | #2 (permalink) |
| Senior Member Join Date: Aug 2002
Posts: 1,255
![]() ![]() | If you add an if statement so it looks something like this: PHP Code: |
| |
| | THREAD STARTER #3 (permalink) |
| NamePros Regular Join Date: Jun 2003 Location: California
Posts: 245
![]() | Thanks but now it just brings up a blank page It's weird I don't get this at all lol. I usually try to make little programs like that as I am going thru the book so it helps me understand but boy this one is evil LOL.
__________________ --Alpha |
| |
| | THREAD STARTER #5 (permalink) |
| NamePros Regular Join Date: Jun 2003 Location: California
Posts: 245
![]() | ................................ IT WORKED!!!!!!! THANKS DEAD!!!!! Ok but that's still weird cuz in my other codes I dont have to put $HTTP_POST_VARS['search'] lol. Who knows PHP is evil THANKS AGAIN!!!!!!EDIT: ......Dead.....I don't think I'm OK. I was supposed to be putting $_POST['search'] not $POST_['search']. Thank you VERY much
__________________ --Alpha |
| |
| | #6 (permalink) | ||||
| Senior Member Join Date: Aug 2002
Posts: 1,255
![]() ![]() |
| ||||
| |
| | THREAD STARTER #8 (permalink) | ||||
| NamePros Regular Join Date: Jun 2003 Location: California
Posts: 245
![]() |
__________________ --Alpha | ||||
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |