input box
Posted by: ferellie (
Date: March 03, 2006 01:55PM

Hello and thank you for this forum.

My code for searching my table is:

// read data from database
$result = mysql_query("select * from $table WHERE categories LIKE '%club%' order by id desc limit $rows", $link)
or die ("Could not read data because ".mysql_error());

What I want to do is get the value of an input box into the srtring search %club%, so instead of searching for club it searches for what the user put into the input box.

My html code is this:

<form id="frmSearch" name="frmSearch" method="post" action="">
<input name="inputSearch" type="text" id="inputSearch" size="20" maxlength="12" />
<input type="submit" name="Submit" value="Search" />

Everything works fine but I'd be over the moon if you could help me to use the users input and search for that!

Many thanks,


Options: ReplyQuote

Sorry, only registered users may post in this forum.