<form name="form1" method="get" action="search.php"> <input name="q" type="text" id="q" value='<? print isset($_GET["q"]) ? stripslashes($_GET["q"]) : ""?>'> <input type="submit" name="Submit" value="Buscar"> </form> <? include "gnix.php"; $connstring = array("db" => "test", "host" => "localhost", "user" => "root", "pass" => ""); if (isset($_GET["q"])) { $query = new Gnix($connstring,MYSQL); $salida = $query->search($_GET["q"]); print_r($salida); } ?>