Plik ajax_search.php:
<?php
require_once('config.php');
require_once('include/functions.php');
$queryString = trim($_POST['queryString']);
// Is there a posted query string?
if($queryString != '')
{
$queryString = secure_sql($queryString);
// only perform queries if the length of the search string is greather than 2 chara
cters
{
$query = @mysql_query("SELECT artist, video_title, uniq_id FROM pm_videos WHERE artist LIKE '$queryString%' OR video_title LIKE '%$queryString%' LIMIT 10"); if($query)
{
{
echo '<li onClick="fill(''.$result['artist'].' - '.$result['video_title'].'');"><a href="'.makevideolink
($result['uniq_id']).'">'.$result['artist'].' - '.$result['video_title'].'</a></li>'; }
}
else
{
echo $lang['search_results_msg3']; }
}
}
?>
Plik config.php
<?php
//-- MySQL information --//
$db_name = 'XXX'; // MySQL database name
$db_user = 'XXX'; // MySQL username
$db_pass = 'XXX'; // MySQL password
$db_host = 'XXX';
//-- Email server info --//
XXXXXXX
XXXXXXX
// ========================================================= //
//-- MySQL Backup Directory Name --//
define('BKUP_DIR', 'temp'); // WITHOUT any trailing slash
header('CONTENT-TYPE: text/html; charset=utf-8'); define('ABSPATH', dirname(__FILE__).'/'); // Full path to the installation folder. No need to change this. require_once( ABSPATH.'include/settings.php');
}
?>
I gdy chcem cos wyszukac na stronie wyskakuje mi taki oto blad:
Warning: Cannot modify header information - headers already sent by (output started at /home/nickxxxxx/domains/xxxx.pl/public_html/ajax_search.php:1) in /home/nickxxxxx/domains/xxxx.pl/public_html/config.php on line 27