Salut, am si eu o mica problema!
Am codul urmator, pentru o functie de serach in MySQL.
Cum as putea sal fac sa functioneze?
Ce e gresit la el?
Cand dau search, imi apare pagina alba
Sau stie cineva un script mai bun?
<?
//connect to mysql
//change user and password to your mySQL name and password
mysql_connect("localhost","*****","******");
//select which database you want to edit
mysql_select_db("cheats");
$search=$_POST["search"];
//get the mysql and store them in $result
//change whatevertable to the mysql table you're using
//change whatevercolumn to the column in the table you want to search
$result = mysql_query("SELECT * FROM >tabel< WHERE title LIKE '%$search%'");
//grab all the content
while($r=mysql_fetch_array($result))
{
//the format is $variable = $r["nameofmysqlcolumn"];
//modify these to match your mysql table columns
$topic=$r["topic"];
$detail=$r["detail"];
$name=$r["name"];
$view=$r["view"];
//display the row
echo "$topic <br> $detail <br> $name <br> $view";
}
?>
OK, am facut setarile, am facut tot. Observ ca are la sfarsit:
$topic=$r["topic"];
$detail=$r["detail"];
$name=$r["name"];
$view=$r["view"];
Iar ca sa afiseze datele, are astfel:
echo "$topic <br> $detail <br> $name <br> $view";
Ce nu merge