Help taking a string value from a search box to check result
Posted: Sat Mar 28, 2009 1:21 pm
Hello,
I am currently learning php, I have a header.php which contains the search box see below
On the search.php i need to get the input from the search box and assign this to $var
Currently I was assuming the value 'search' from the first code would contain the search string and therefore assign to the $var although this is not working, any help would be appreciated
I am currently learning php, I have a header.php which contains the search box see below
Code: Select all
"<form method='post' action='search.php'> \n".
"<td align='right'><input type='text' size='20' name='search'> <input type ='submit' value='Search'></td> \n".
"</form></tr> \n".
Currently I was assuming the value 'search' from the first code would contain the search string and therefore assign to the $var although this is not working, any help would be appreciated
Code: Select all
// Get the search variable from URL
$var = Search;