d3a7h_1313
Registered
Някой може ли да ми направи търсачка за следната система http://web-tourist.net/login/login/view.php?st=2006 +1 ако го направи
Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
<form method="GET" action="s.php">
<table cellpadding="0" cellspacing="0" width="300px" >
<tr>
<td align="right" width="200px"><input type="text" name="search" size="30"></td>
<td align="right" width="100px"><input type="submit" value="Търси"></td>
</tr>
</table>
</form>
<?php
$tarsene = $_GET['search'];
$server = "ХОСТ";
$dbusername = "ПОТРЕБИТЕЛ";
$dbpassword = "ПАРОЛА";
$db_name = "БАЗА ДАННИ";
mysql_connect($server, $dbusername, $dbpassword)or die("Сайтът не може да се свърже към базата данни");
@mysql_select_db($db_name) or die("Грешна база данни");
$query = " SELECT * FROM songs WHERE author LIKE '%$tarsene%' OR artist LIKE '%$tarsene%' OR title LIKE '%$tarsene%'";
$result = mysql_query($query) or die('Грешка!');
$row = mysql_numrows($result);
echo "<center>Търсачката намери следните резултати:";
echo "<br><br>";
while($row = mysql_fetch_array($result))
{
$ime = $row[title];
$idto = $row['id'];
$pevec = $row[artist];
echo "<a href='playsong.php?id=$idto'style=' text-decoration:
none;'><b><i>$pevec - $ime</i></b></a><br />";
}
?>
<?php
$tarsene = $_GET['search'];
$server = "localhost";
$dbusername = "root";
$dbpassword = "vertrigo";
$db_name = "songs";
mysql_connect($server, $dbusername, $dbpassword)or die("Сайтът не може да се
свърже към базата данни");
@mysql_select_db($db_name) or die("Грешна база данни");
$query = " SELECT * FROM songs WHERE author LIKE '%$tarsene%' OR artist LIKE
'%$tarsene%' OR title LIKE '%$tarsene%'";
$result = mysql_query($query) or die('Грешка!');
$row = mysql_numrows($result);
echo "<center>Търсачката намери следните резултати:";
echo "<br><br>";
while($row = mysql_fetch_array($result))
{
$ime = $row[ime];
$idto = $row['id'];
$pevec = $row[izpulnitel];
echo "<a href='playsong.php?id=$idto' style=' text-decoration:
none;'><b><i>$pevec - $ime</i></b></a><br />";
}
?>
<?php
$tarsene = $_GET['search'];
$server = "localhost";
$dbusername = "NESHTO";
$dbpassword = "NESHTO";
$db_name = "NESHTO";
mysql_connect($server, $dbusername, $dbpassword)or die("Сайтът не може да се
свърже към базата данни");
@mysql_select_db($db_name) or die("Грешна база данни");
$query = " SELECT * FROM songs WHERE author LIKE '%$tarsene%' OR artist LIKE
'%$tarsene%' OR title LIKE '%$tarsene%'";
$result = mysql_query($query) or die('Грешка!');
$row = mysql_numrows($result);
echo "<center>Търсачката намери следните резултати:";
echo "<br><br>";
while($row = mysql_fetch_array($result))
{
$ime = $row[title];
$idto = $row['id'];
$pevec = $row[author];
echo "<a href='playsong.php?id=$idto'style=' text-decoration:
none;'><b><i>$pevec - $ime</i></b></a><br />";
}
?>
<form method="GET" action="s.php">
<table cellpadding="0" cellspacing="0" width="300px" >
<tr>
<td align="right" width="200px"><input type="text" name="search" size="30"></td>
<td align="right" width="100px"><input type="submit" value="Търси"></td>
</tr>
</table>
</form>
<?php
$tarsene = $_GET['search'];
$server = "localhost";
$dbusername = "USER";
$dbpassword = "PASS";
$db_name = "BD";
mysql_connect($server, $dbusername, $dbpassword)or die("Сайтът не може да се
свърже към базата данни");
@mysql_select_db($db_name) or die("Грешна база данни");
$query = " SELECT * FROM songs WHERE author LIKE '%$tarsene%' OR artist LIKE
'%$tarsene%' OR title LIKE '%$tarsene%'";
$result = mysql_query($query) or die('Грешка!');
$row = mysql_numrows($result);
echo "<center>Търсачката намери следните резултати:";
echo "<br><br>";
while($row = mysql_fetch_array($result))
{
$ime = $row[title];
$idto = $row['id'];
$pevec = $row[author];
echo "<a href='playsong.php?id=$idto'style=' text-decoration:
none;'><b><i>$pevec - $ime</i></b></a><br />";
}
?>
$server = "localhost"; //сървъра на който ти е файла
$dbusername = "USER"; // потр. име към базата данни
$dbpassword = "PASS"; // парола към базата данни
$db_name = "BD"; // име на базата данни
$query = " SELECT * FROM songs WHERE author LIKE '%$tarsene%' OR artist LIKE
'%$tarsene%' OR title LIKE '%$tarsene%'";
<form method="GET" action="">
<table cellpadding="0" cellspacing="0" width="300px" >
<tr>
<td align="right" width="200px"><input type="text" name="q" size="30"></td>
<td align="right" width="100px"><input type="submit" value="Търси"></td>
</tr>
</table>
</form>
<?php
if($_GET['q'])
{
$server = "localhost";
$dbusername = "ime";
$dbpassword = "parola";
$db_name = "bazaime";
$simvola_search="3"; //minimalen broj simvoli za tyrsene
$tarsene = $_GET['q'];
$spl_word=explode(" ",$tarsene);
$res.="WHERE";
foreach ($spl_word as $value)
{
if (strlen($value)>=$simvola_search)
{
$value = str_replace("+", " ", $value);
$ress[]=" author LIKE %".$value."%";
$ress[]=" artist LIKE %".$value."%";
$ress[]=" title LIKE %".$value."%";
}
}
$res.= implode(" OR ", $ress);
mysql_connect($server, $dbusername, $dbpassword)or die("Сайтът не може да се свърже към базата данни");
@mysql_select_db($db_name) or die("Грешна база данни");
$query = "SELECT * FROM songs $res";
$result = mysql_query($query) or die('Error, query failed');
$row = mysql_numrows($result);
echo "Намерени резултати за: <b><i>$tarsene</i></b>";
echo "<br />";
while($row = mysql_fetch_array($result))
{
$ime = $row['title'];
$idto = $row['id'];
$pevec = $row['artist'];
echo "<a href='playsong.php?id=$idto' style='text-decoration: none;'><b><i>$pevec - $ime</i></b></a><br />";
}
}
?>