not sure why its not working..

Search For: <input type="reset" value="Reset" <?php //PHP CODE STARTS HERE if(isset($_GET['submit'])){ // Change the fields below as per the requirements $db_host="localhost"; $db_username="root"; $db_password="qweqwe"; $db_name="mydb"; $db_tb_name="productdev"; $db_tb_atr_name="title"; $con = mysql_connect("xxx","xx","xx"); mysql_select_db("mydb", $con); $query=mysql_real_escape_string($_GET['query']); $query_for_result=mysql_query("SELECT * FROM $db_tb_name WHERE $db_tb_atr_name like '%".$query."%'"); echo "

Search Results

    "; while($data_fetch=mysql_fetch_array($query_for_result)) { echo "
  1. "; echo substr($data_fetch[$db_tb_atr_name], 0,160); echo "

  2. "; } echo "
"; mysql_close(); } ?>

What exactly does not work? Also, in future please use php tags (as shown in the message above the text box that is used to create a thread or reply to one).

Hi jSherz

Thanks for replying. What I’m getting is “The connection was reset” When I try searching.

Is that the full error?

Yep. That’s the browser’s error. Apache did not log this as an error. not sure where to start :slight_smile:

And this only happens after submitting the form? The only think I can think of is some kind of connectivity problem between you and the host - is it run locally? Would any kind of software you have installed block the connection?

Sponsor our Newsletter | Privacy Policy | Terms of Service