i write search for my dictionary
and now i want use in XOOPS
but i dont know what code i must change until use this in xoops
please help me and say me waht code must changes
for example in when i get a word in a textbox ($c= "$_GET[word]";) in XOOPS what must write??
this is search.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<?php
$c= "$_GET[word]";
$query="SELECT * FROM tb2,tb4";
if(trim($_GET[word])!='')
{
$query = $query . " WHERE word LIKE '". trim($_GET[word]) . "%' AND tb2.idF=tb4.idF AND grace='".true."' ";
}
$link = mysql_connect("localhost","root","");
if(!$link) die("couldn't connect to mysql");
mysql_query("SET NAMES 'utf8'", $link);
mysql_query("SET CHARACTER SET 'utf8'", $link);
mysql_query("SET character_set_connection = 'utf8'", $link);
//$db_connection_string=mysql_connect("localhost","root","") or die("error :".mysql_error());
$database = "dic1";
mysql_select_db($database) or die("coundn't open $database");
$result=mysql_query($query);
$my = 0;
$bgcolor = "#E0E0E0"; // light gray
echo '<br><p dir="rtl"><font face="Tahoma" size="4"><b>'list of word'</b></font></p><br>';
echo '<div align="center"><center><table border="0" bordercolor="#111111" width="80%">
<tr bgcolor=#E0E0E0 align= center>
<td><font face="Tahoma" size="2"><b>example</b></font></td>
<td><font face="Tahoma" size="2"><b>meaning</b></font></td>
<td><font face="Tahoma" size="2"><b>word</b></font></td>';
while ($line = mysql_fetch_array($result, MYSQL_ASSOC))
{
if ($bgcolor == "#E0E0E0"){
$bgcolor = "#FFFFFF";
}else{
$bgcolor = "#E0E0E0";
}
$my = $my + 1;
echo("<tr bgcolor=".$bgcolor."><td align= center>");
echo ' <font face="Tahoma" size="2">'.$line["example"].'</font>';
echo("</td><td align= right>");
echo ' <font face="Tahoma" size="2">'.$line["meaning"].'</font>';
echo("</td><td align= right>");
echo ' <font face="Tahoma" size="2">'.$line["word"].'</font>';
echo("</td><td align= right>");
echo("</td></tr>");
}
if($my==0)
{
$query = " INSERT INTO `tb6` ( `wait` ) VALUES ( '" . $_GET[word] . "');";
mysql_query($query);
}
echo("</table></center></div><center><br>");
//echo "</table>";
mysql_free_result($result);
mysql_close($link);
include ('wait.php');
?>
</body>
</html>