PHP form errors
mdb Offline
Junior Member
**
Posts: 27
Joined: May 2012
Post: #1
PHP form errors
Hey guys,
I'm trying to add a form in my php script but can't seem to get it working correctly. It's basically a form that allows the user to search for people in an sql database.

Here is the part that seems to be going wrong:

PHP Code:
1
2
3
4
5
6
7
8
9
10
echo '<form name="search" method="post" action="'.$targetpage.'"><td><input type="text" name="find" size="50" maxLength="30" /></td>';
	echo '<td><Select NAME="field"><Option VALUE="name">Player Name</option><option VALUE="steamid">Steam ID</option><option VALUE="ip">IP Address</option></select><input type="hidden" name="searching" value="yes" /><input type="submit" name="search" value="Search" /></form></td></tr>';
	if ($searching == "yes")
 	{
		echo "Search Successful!";
		if ($find == "")
 		{
 			echo "<tr class=\"trow1\"><td>You didn't give me anything to search for</td></tr></table>"; 
 exit; 
 		}


For some reason it won't even get passed that first if statement. I can't get it to echo search successful. Any help would be greatly appreciated.

07-29-2012 10:31 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
PHP form errors - mdb - 07-29-2012 10:31 AM
RE: PHP form errors - ZiNgA BuRgA - 07-29-2012, 02:51 PM
RE: PHP form errors - mdb - 07-29-2012, 06:11 PM
RE: PHP form errors - ZiNgA BuRgA - 07-29-2012, 09:05 PM
RE: PHP form errors - mdb - 07-30-2012, 02:58 AM
RE: PHP form errors - ZiNgA BuRgA - 07-30-2012, 07:50 AM

 Standard Tools
Forum Jump: