I have this php code:
<?php
$word = "hello all"
echo $word;
?>
How do i type, if i want to add after hello and before all 10 lines of some other php code (this 10 lines will print something)
Thanks!
| SitePoint Sponsor |
I have this php code:
<?php
$word = "hello all"
echo $word;
?>
How do i type, if i want to add after hello and before all 10 lines of some other php code (this 10 lines will print something)
Thanks!
I don't understand the question. Only thing I notice about the code you post is that you're missing the semicolon (;) after the variable assignment.
But it would be perfectly fine to do something like:
PHP Code:$word = "hello all";
echo 'something else';
echo 'yet some more text';
echo 'and even more!';
echo $word;
or maybe this?
PHP Code:<?php
$word = "hello all"
echo $word;
$word2 = "hello again"
echo $word2;
print "$word\n$word2";
?>
Run a site? over 1,000 uniques a day? PM me for link exchange.
or maybe this...
PHP Code:<?php
$word = "hello all"
$words = explode(" ", word);
echo $words[0] . " 10 lines of code " . $words[1];
?>
I have
<?php
$word = "hello all"
echo $word;
?>
and 1.php
<?php
mysql_connect('localhost', '', '');
mysql_select_db('');
$string = "music+remix+mp3";
$keyword = explode ('+', $string);
$count = count($keyword);
$field = 'keyword';
$like = '';
for($i=0;$i<$count;$i++)
{
if($i==0)
{
$like .= "$field LIKE '%$keyword[$i]%'";
}
else
{
$like .= "OR $field LIKE '%$keyword[$i]%'";
}
}
$query = "SELECT * FROM terms WHERE $like";
$display = @mysql_query($query);
echo $display;
?>
I want to add the code from 1.php after hello and between all
Now you understand?
Thanks!

Hi there,
Apart from the missing semi-colon that someone else already mentioned, paste it in and it should work fine !
Have you tried and are getting a specific error ?
Let us know.
regards, Dave Porter





How about
PHP Code:<?php
mysql_connect('localhost', '', '');
mysql_select_db('');
$string = "music+remix+mp3";
$keyword = explode ('+', $string);
$count = count($keyword);
$field = 'keyword';
$like = '';
for($i=0;$i<$count;$i++){
if($i==0){
$like .= "$field LIKE '%$keyword[$i]%'";
}else{
$like .= "OR $field LIKE '%$keyword[$i]%'";
}
}
$query = "SELECT * FROM terms WHERE $like";
$display = @mysql_query($query);
echo 'hello all';
echo $display;
?>
A Little Knowledge Is A Very Dangerous Thing.......
That Makes Me A Lethal Weapon !!!!!!!!
Contract PHP Programming
Ok...
If just paste the code will display me a blank page... look into index3.php.txt
Thanks!
Last edited by sosoro; Sep 11, 2005 at 06:43.





The attachment you sent me will take hours to approve, please send it to me via PM
A Little Knowledge Is A Very Dangerous Thing.......
That Makes Me A Lethal Weapon !!!!!!!!
Contract PHP Programming





OK I have the attachment.
Question, Are you sure this script works on its own, there is a lot of dodgy code in there ?
I don't want to insert you other script if the original doesn't work in the first place !!
A Little Knowledge Is A Very Dangerous Thing.......
That Makes Me A Lethal Weapon !!!!!!!!
Contract PHP Programming





OK, despite my reservations on your first script, I've put the second script inside it as you requested.
Please learn to format your code, reading it is a nightmare, also why did you have an empty line between every line of code ? I've formatted it as much as I can.
BUT
In your first script there are many if { } else {} without the second set of brackets !! this makes it imposible to know what you are doing, and I suspect that the script won't work correctly because of it.
PHP Code:<?
include("main_inc.php");
include("ettings_class.php");
include("pager_class.php");
include("includes/ads.php");
include("last_s.php");
include("last_dreapta.php");
include("last_download.php");
include("last_top.php");
include("last_extra.php");
db_connect();
$_settings = new Settings();
$search_cats = array('web'=>'Web','news'=>'Stiri','images'=>'Poze','video'=>'Video','audio'=>'Audio','shopping'=>'Shopping');
//array('web'=>'Web','news'=>'News','images'=>'Pictures','video'=>'Video','audio'=>'Audio','shopping'=>'Shopping');
$type = isset($_GET['type']) ? $_GET['type'] : 'web';
$keywords = isset($_GET['search']) ? $_GET['search'] : '';
$parsed_keywords = htmlspecialchars(chop($keywords));
$prepared_keywords = str_replace(" ","+",chop($keywords));
$tabs = "";
if ($type == 'compare'){
$old_type = $type;
$type = 'shopping';
}else
$old_type = $type;
foreach($search_cats as $search_type=>$display_name){
if ($search_type == $type){
$tabs .= '';
}else{
$tabs .= '';
}
}
if ((strlen(chop($keywords)) == 0)){
$content = '
<table width="100%" cellSpacing=0 cellPadding=0>
<tr><td align="center">
<SPAN class=tabSpace></SPAN><A class=tabOn href="http://www.bestweb.ro">Home</A><SPAN class=tabSpace></SPAN><A class=tabOff href="http://chat.bestweb.ro">Chat</A><SPAN class=tabSpace></SPAN><A class=tabOff href="http://www.bestweb.ro/get">Download</A><SPAN class=tabSpace></SPAN><A class=tabOff href="http://forum.bestweb.ro">Forum</A><SPAN class=tabSpace></SPAN><A class=tabOff href="http://sms.bestweb.ro">SMS & GSM</A><SPAN class=tabSpace></SPAN>
</td></tr></table>
<DIV class="searchBar2">
<TABLE cellSpacing=0 cellPadding=0 border=0 width="100%" height="70">
<TR>
<TD align=center>
<SPAN class=query>
<form name="searchform" onSubmit="return dosearch();">
<input type="text" name="searchterms" value="'.$parsed_keywords.'">
<select name="sengines">
<option value="http://www.bestweb.ro/get/cauta.html?query=" selected>in Download</option>
<option value="http://cauta.bestweb.ro/?type=shopping&search=" selected>in Shopping</option>
<option value="http://cauta.bestweb.ro/?type=news&search=" selected>in Stiri</option>
<option value="http://cauta.bestweb.ro/?type=images&search=" selected>in Poze</option>
<option value="http://cauta.bestweb.ro/?type=video&search=" selected>in Video</option>
<option value="http://cauta.bestweb.ro/?type=audio&search=" selected>in Audio</option>
<option value="http://cauta.bestweb.ro/?type=web&search=" selected>pe Web</option>
'.$tabs.'
</select>
<input type="submit" name="SearchSubmit" value="Search">
</form>
</SPAN>
</TD>
</TR>
</TABLE>
</DIV>
</form>';
}else{
$from_cache = FALSE;
add_stat_to_db($prepared_keywords,$type);
if ($_settings->is_cache_used()){
$result = check_chache($_SERVER['QUERY_STRING'],$_settings->get_cache_time());
}else
$result = TRUE;
$type = $old_type;
if (($_settings->is_cache_used() && ($result === FALSE)) || ($result === TRUE)){
switch ($type){
case 'web':{
include("includes/classes/web_search_class.php");
$results = new WebSearch($_settings,$prepared_keywords);
$results_html = $results->get_results();
$total_found_string = $results->m_total_found_string;
}break;
case 'news':{
include("includes/classes/news_search_class.php");
$results = new NewsSearch($_settings,$prepared_keywords);
$results_html = $results->get_results();
$total_found_string = $results->m_total_found_string;
}break;
case 'images':{
include("includes/classes/images_search_class.php");
$results = new ImagesSearch($_settings,$prepared_keywords);
$results_html = $results->get_results();
$total_found_string = $results->m_total_found_string;
}break;
case 'video':{
include("includes/classes/video_search_class.php");
$results = new VideoSearch($_settings,$prepared_keywords);
$results_html = $results->get_results();
$total_found_string = $results->m_total_found_string;
}break;
case 'audio':{
include("includes/classes/audio_search_class.php");
$results = new AudioSearch($_settings,$prepared_keywords);
$results_html = $results->get_results();
$total_found_string = $results->m_total_found_string;
}break;
case 'shopping':{
include("includes/classes/shopping_search_class.php");
$results = new ShoppingSearch($_settings,$prepared_keywords);
$results_html = $results->get_results();
$total_found_string = $results->m_total_found_string;
}break;
case 'compare':{
include("includes/classes/compare_shopping_search_class.php");
$results = new CompareShoppingSearch($_settings,$prepared_keywords);
$results_html = $results->get_results();
$total_found_string = $results->m_total_found_string;
}break;
}
$adsp = isset($_GET['pos']) ? $_GET['pos'] : 1;
$top_ads = get_ads('top',$prepared_keywords,$adsp);
$side_ads = get_ads('side',$prepared_keywords,$adsp);
$bottom_ads = get_ads('bottom',$prepared_keywords,$adsp);
if ($type == 'compare')
$type = 'shopping';
$content = '
<table width="100%" cellSpacing=0 cellPadding=0>
<tr><td align="center">
<SPAN class=tabSpace></SPAN><A class=tabOn href="http://www.bestweb.ro">Home</A><SPAN class=tabSpace></SPAN><A class=tabOff href="http://chat.bestweb.ro">Chat</A><SPAN class=tabSpace></SPAN><A class=tabOff href="http://www.bestweb.ro/get">Download</A><SPAN class=tabSpace></SPAN><A class=tabOff href="http://forum.bestweb.ro">Forum</A><SPAN class=tabSpace></SPAN><A class=tabOff href="http://sms.bestweb.ro">SMS & GSM</A><SPAN class=tabSpace></SPAN>
</td></tr></table>
<DIV class="searchBar2">
<TABLE cellSpacing=0 cellPadding=0 border=0 width="100%" height="70">
<TR>
<TD align=center>
<SPAN class=query>
<form name="searchform" onSubmit="return dosearch();">
<input type="text" name="searchterms" value="'.$parsed_keywords.'">
<select name="sengines">
<option value="http://www.bestweb.ro/get/cauta.html?query=" selected>in Download</option>
<option value="http://cauta.bestweb.ro/?type=shopping&search=" selected>in Shopping</option>
<option value="http://cauta.bestweb.ro/?type=news&search=" selected>in Stiri</option>
<option value="http://cauta.bestweb.ro/?type=images&search=" selected>in Poze</option>
<option value="http://cauta.bestweb.ro/?type=video&search=" selected>in Video</option>
<option value="http://cauta.bestweb.ro/?type=audio&search=" selected>in Audio</option>
<option value="http://cauta.bestweb.ro/?type=web&search=" selected>pe Web</option>
'.$tabs.'
</select>
<input type="submit" name="SearchSubmit" value="Search">
</form>
</SPAN>
</TD>
</TR>
</TABLE>
</DIV>
</form>
<DIV class=resultHeading>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border="0">
<TR>
<TD class=inf align="right">
'.$total_found_string.'
</TD>
</TR>
</TABLE>
</DIV>
<table width="100%" border="0">
<tr>
<!--top_ads-->
<td align="left" colspan="2">
<table border="0" width="100%" bgcolor="#f8fff5" style="border: 1px; border-style: solid; border-color: #b6dff6">
<tr>
<td align="left">
<table border="0" cellpadding="5" cellspacing="0" width="100%" bgcolor="#F8FFF5" bordercolor="#111111">
<tbody><tr>
<td valign="top" width="47%">
<table border="0" cellpadding="2" cellspacing="0" width="100%">
<tbody><tr><td align="left" style="COLOR:#000000;font-size:12px;"><b>Ultimele topicuri pe forum</b></td></tr>
<tr><td>'.To(9).'</td></tr>
</tbody></table>
</td>
<td valign="top" width="32%">
<table border="0" cellpadding="2" cellspacing="0" width="100%">
<tbody><tr><td align="left" style="COLOR:#000000;font-size:12px;"><b>Ultimele programe adaugate</b></td></tr>
<tr><td>'.Dow(9).'</td></tr>
</tbody></table>
</td>
<td valign="top" width="21%">
<table border="0" cellpadding="2" cellspacing="0" width="100%">
<tbody><tr><td align="left" style="COLOR:#000000;font-size:12px;"><b>Ultimele cautari</b></td></tr>
<tr><td>'.Cuv(9).'</td></tr>
</tbody></table>
</td>
</tr></tbody>
</table>
</tr></table>
</td>
<!--top_ads_eof-->
</tr>
<tr>
<td valign="top" width="80%">
<!--Search_results-->
'.$results_html.'
<!--Search_results_eof-->
</td>
<!--side_ads-->
<td valign="top">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<span style="FONT-SIZE: 10px; COLOR: #666666; FONT-FAMILY: arial">PENTRU TINE</span>
</td>
</tr>
<tr>
<td align="left">
<div style="padding-top:5px">
<table border="0" width="188" bgcolor="#f8fff5" style="border: 1px; border-style: solid; border-color: #b6dff6"><tr>
<td style="padding-top:10px;padding-left:10px;padding-bottom:10px;padding-right:10px;">
<center><span style="FONT-SIZE: 10px; COLOR: #666666; FONT-FAMILY: arial"><b><font color="#FF0000">Mobile Mania</FONT></b></span></center><Br>
<img src=http://www.bestweb.ro/punct.gif border=0 width=180 height=0><br>
<center>
<a href="http://sms.bestweb.ro"><img src="http://sms.bestweb.ro/promo/all.gif" border="0"></a>
</center>
</td>
</tr>
</table>
</div>
<div style="padding-top:5px">
<table border="0" width="188" bgcolor="#f8fff5" style="border: 1px; border-style: solid; border-color: #b6dff6"><tr>
<td style="padding-top:10px;padding-left:10px;padding-bottom:10px;padding-right:10px;">
<img src=http://www.bestweb.ro/punct.gif border=0 width=180 height=0><br>
<center>
<!-- affiliate code -->
<script language=javascript src=http://ads.neogen.ro/affiliates/ads.php?VERTI%0D%10></script>
<!-- end affiliate code -->
</center>
</td>
</tr>
</table>
</div>
<div style="padding-top:5px">
<table border="0" width="188" bgcolor="#f8fff5" style="border: 1px; border-style: solid; border-color: #b6dff6"><tr>
<td style="padding-top:10px;padding-left:10px;padding-bottom:10px;padding-right:10px;"><center>
<span style="FONT-SIZE: 10px; COLOR: #666666; FONT-FAMILY: arial"><b>Cautari asemanatoare</b></span></center><br>
<img src=http://www.bestweb.ro/punct.gif border=0 width=180 height=0><br>
<center>';
//INSERT STARTS HERE
$keywords = explode("+", "motru+film");
if ($keywords[0] != NULL){
$query = "SELECT * FROM ro_terms WHERE keyword LIKE '%".$keywords[0]."%'";
for ($i=1;$i<count($keywords);$i++){
$query.= " OR keyword LIKE '%".$keywords[$i]."%'";
}
$query .= ' LIMIT 20';
}
$result = @mysql_query($query) or die(mysql_error());
if(mysql_num_rows($result)){
while($row = mysql_fetch_assoc($result)){
$cuvant = $row['keyword'];
$cuvant = str_replace("+", " ", $cuvant);
content .= '<font size="2"><a href="http://cauta.bestweb.ro/'.$row['type'].'_'.$row['keyword'].'.html">'.$cuvant.'</a></font><br>';
}
}else{
content .= 'Nu exista cautari similare!';
}
//INSERT FINISHES HERE
content .='
</center>
</td>
</tr>
</table>
</div><div style="padding-top:5px">
<table border="0" width="188" bgcolor="#f8fff5" style="border: 1px; border-style: solid; border-color: #b6dff6"><tr>
<td style="padding-top:10px;padding-left:10px;padding-bottom:10px;padding-right:10px;"><center>
<span style="FONT-SIZE: 10px; COLOR: #666666; FONT-FAMILY: arial"><b>Top cautari</b></span></center><br>
<img src=http://www.bestweb.ro/punct.gif border=0 width=180 height=0><br>
<center>'.showLastTop(15).'</center>
</td>
</tr>
</table>
</div>
<div style="padding-top:5px">
<table border="0" width="188" bgcolor="#f8fff5" style="border: 1px; border-style: solid; border-color: #b6dff6"><tr>
<td style="padding-top:10px;padding-left:10px;padding-bottom:10px;padding-right:10px;"><center>
<span style="FONT-SIZE: 10px; COLOR: #666666; FONT-FAMILY: arial"><b>Ultimele programe adaugate</b></span></center><br>
<img src=http://www.bestweb.ro/punct.gif border=0 width=180 height=0><br>
<center>'.showLastdown(15).'</center>
</td>
</tr>
</table>
</div>
</div>
</td></tr>
</table>
</td>
<!--side_ads_eof-->
</tr>
<tr>
<!--bottom_ads-->
<td align="left" colspan="2">
<table border="0" width="100%" bgcolor="#f8fff5" style="border: 1px; border-style: solid; border-color: #b6dff6">
<tr>
<td align="left">Ultimile cautari:
'.showLast(3).'
<td width="150" valign="top" align="RIGHT"><span style="FONT-SIZE: 10px; COLOR: #666666; FONT-FAMILY: arial">CAUTARI</span></td></tr></table>
</td>
<!--bottom_ads_eof-->
</tr>
</table>
<br>
<form method="get">
<DIV class="searchBarbottom">
<TABLE cellSpacing=0 cellPadding=0 border=0 width="100%" height="40">
<TR>
<TD align=center>
<SPAN class=query>
<INPUT maxLength=200 size=40 name=search value="'.$parsed_keywords.'">
<INPUT type=submit value=" Search ">
<INPUT type=hidden value="'.$type.'" name="type">
</SPAN>
</TD>
</TR>
</TABLE>
</div>
</form>';
if ($_settings->is_cache_used() && ($result === FALSE)){
add_data_to_cache($_SERVER['QUERY_STRING'],$content,$_settings->get_cache_time(),$_settings->get_cache_size());
}
}else{
$content = $result;
}
}
$titlu = '
<HTML>
<HEAD>
<TITLE>cauta.BestWeb.ro '.$parsed_keywords.'</TITLE>';
echo $titlu;
echo $_settings->get_header();
echo $content;
echo $_settings->get_footer();
?>
A Little Knowledge Is A Very Dangerous Thing.......
That Makes Me A Lethal Weapon !!!!!!!!
Contract PHP Programming
Hi!
The intial php code (the page) work 100% corect .. is a web search...
I think the aditional code is not placed good.. not work.. It display me a white page..





Try this code below and tell me what you get ?Originally Posted by sosoro
PHP Code:<?
include("main_inc.php");
include("ettings_class.php");
include("pager_class.php");
include("includes/ads.php");
include("last_s.php");
include("last_dreapta.php");
include("last_download.php");
include("last_top.php");
include("last_extra.php");
db_connect();
$_settings = new Settings();
$search_cats = array('web'=>'Web','news'=>'Stiri','images'=>'Poze','video'=>'Video','audio'=>'Audio','shopping'=>'Shopping');
//array('web'=>'Web','news'=>'News','images'=>'Pictures','video'=>'Video','audio'=>'Audio','shopping'=>'Shopping');
$type = isset($_GET['type']) ? $_GET['type'] : 'web';
$keywords = isset($_GET['search']) ? $_GET['search'] : '';
$parsed_keywords = htmlspecialchars(chop($keywords));
$prepared_keywords = str_replace(" ","+",chop($keywords));
$tabs = "";
if ($type == 'compare'){
$old_type = $type;
$type = 'shopping';
}else
$old_type = $type;
foreach($search_cats as $search_type=>$display_name){
if ($search_type == $type){
$tabs .= '';
}else{
$tabs .= '';
}
}
if ((strlen(chop($keywords)) == 0)){
$content = '
<table width="100%" cellSpacing=0 cellPadding=0>
<tr><td align="center">
<SPAN class=tabSpace></SPAN><A class=tabOn href="http://www.bestweb.ro">Home</A><SPAN class=tabSpace></SPAN><A class=tabOff href="http://chat.bestweb.ro">Chat</A><SPAN class=tabSpace></SPAN><A class=tabOff href="http://www.bestweb.ro/get">Download</A><SPAN class=tabSpace></SPAN><A class=tabOff href="http://forum.bestweb.ro">Forum</A><SPAN class=tabSpace></SPAN><A class=tabOff href="http://sms.bestweb.ro">SMS & GSM</A><SPAN class=tabSpace></SPAN>
</td></tr></table>
<DIV class="searchBar2">
<TABLE cellSpacing=0 cellPadding=0 border=0 width="100%" height="70">
<TR>
<TD align=center>
<SPAN class=query>
<form name="searchform" onSubmit="return dosearch();">
<input type="text" name="searchterms" value="'.$parsed_keywords.'">
<select name="sengines">
<option value="http://www.bestweb.ro/get/cauta.html?query=" selected>in Download</option>
<option value="http://cauta.bestweb.ro/?type=shopping&search=" selected>in Shopping</option>
<option value="http://cauta.bestweb.ro/?type=news&search=" selected>in Stiri</option>
<option value="http://cauta.bestweb.ro/?type=images&search=" selected>in Poze</option>
<option value="http://cauta.bestweb.ro/?type=video&search=" selected>in Video</option>
<option value="http://cauta.bestweb.ro/?type=audio&search=" selected>in Audio</option>
<option value="http://cauta.bestweb.ro/?type=web&search=" selected>pe Web</option>
'.$tabs.'
</select>
<input type="submit" name="SearchSubmit" value="Search">
</form>
</SPAN>
</TD>
</TR>
</TABLE>
</DIV>
</form>';
}else{
$from_cache = FALSE;
add_stat_to_db($prepared_keywords,$type);
if ($_settings->is_cache_used()){
$result = check_chache($_SERVER['QUERY_STRING'],$_settings->get_cache_time());
}else
$result = TRUE;
$type = $old_type;
if (($_settings->is_cache_used() && ($result === FALSE)) || ($result === TRUE)){
switch ($type){
case 'web':{
include("includes/classes/web_search_class.php");
$results = new WebSearch($_settings,$prepared_keywords);
$results_html = $results->get_results();
$total_found_string = $results->m_total_found_string;
}break;
case 'news':{
include("includes/classes/news_search_class.php");
$results = new NewsSearch($_settings,$prepared_keywords);
$results_html = $results->get_results();
$total_found_string = $results->m_total_found_string;
}break;
case 'images':{
include("includes/classes/images_search_class.php");
$results = new ImagesSearch($_settings,$prepared_keywords);
$results_html = $results->get_results();
$total_found_string = $results->m_total_found_string;
}break;
case 'video':{
include("includes/classes/video_search_class.php");
$results = new VideoSearch($_settings,$prepared_keywords);
$results_html = $results->get_results();
$total_found_string = $results->m_total_found_string;
}break;
case 'audio':{
include("includes/classes/audio_search_class.php");
$results = new AudioSearch($_settings,$prepared_keywords);
$results_html = $results->get_results();
$total_found_string = $results->m_total_found_string;
}break;
case 'shopping':{
include("includes/classes/shopping_search_class.php");
$results = new ShoppingSearch($_settings,$prepared_keywords);
$results_html = $results->get_results();
$total_found_string = $results->m_total_found_string;
}break;
case 'compare':{
include("includes/classes/compare_shopping_search_class.php");
$results = new CompareShoppingSearch($_settings,$prepared_keywords);
$results_html = $results->get_results();
$total_found_string = $results->m_total_found_string;
}break;
}
$adsp = isset($_GET['pos']) ? $_GET['pos'] : 1;
$top_ads = get_ads('top',$prepared_keywords,$adsp);
$side_ads = get_ads('side',$prepared_keywords,$adsp);
$bottom_ads = get_ads('bottom',$prepared_keywords,$adsp);
if ($type == 'compare')
$type = 'shopping';
$content = '
<table width="100%" cellSpacing=0 cellPadding=0>
<tr><td align="center">
<SPAN class=tabSpace></SPAN><A class=tabOn href="http://www.bestweb.ro">Home</A><SPAN class=tabSpace></SPAN><A class=tabOff href="http://chat.bestweb.ro">Chat</A><SPAN class=tabSpace></SPAN><A class=tabOff href="http://www.bestweb.ro/get">Download</A><SPAN class=tabSpace></SPAN><A class=tabOff href="http://forum.bestweb.ro">Forum</A><SPAN class=tabSpace></SPAN><A class=tabOff href="http://sms.bestweb.ro">SMS & GSM</A><SPAN class=tabSpace></SPAN>
</td></tr></table>
<DIV class="searchBar2">
<TABLE cellSpacing=0 cellPadding=0 border=0 width="100%" height="70">
<TR>
<TD align=center>
<SPAN class=query>
<form name="searchform" onSubmit="return dosearch();">
<input type="text" name="searchterms" value="'.$parsed_keywords.'">
<select name="sengines">
<option value="http://www.bestweb.ro/get/cauta.html?query=" selected>in Download</option>
<option value="http://cauta.bestweb.ro/?type=shopping&search=" selected>in Shopping</option>
<option value="http://cauta.bestweb.ro/?type=news&search=" selected>in Stiri</option>
<option value="http://cauta.bestweb.ro/?type=images&search=" selected>in Poze</option>
<option value="http://cauta.bestweb.ro/?type=video&search=" selected>in Video</option>
<option value="http://cauta.bestweb.ro/?type=audio&search=" selected>in Audio</option>
<option value="http://cauta.bestweb.ro/?type=web&search=" selected>pe Web</option>
'.$tabs.'
</select>
<input type="submit" name="SearchSubmit" value="Search">
</form>
</SPAN>
</TD>
</TR>
</TABLE>
</DIV>
</form>
<DIV class=resultHeading>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border="0">
<TR>
<TD class=inf align="right">
'.$total_found_string.'
</TD>
</TR>
</TABLE>
</DIV>
<table width="100%" border="0">
<tr>
<!--top_ads-->
<td align="left" colspan="2">
<table border="0" width="100%" bgcolor="#f8fff5" style="border: 1px; border-style: solid; border-color: #b6dff6">
<tr>
<td align="left">
<table border="0" cellpadding="5" cellspacing="0" width="100%" bgcolor="#F8FFF5" bordercolor="#111111">
<tbody><tr>
<td valign="top" width="47%">
<table border="0" cellpadding="2" cellspacing="0" width="100%">
<tbody><tr><td align="left" style="COLOR:#000000;font-size:12px;"><b>Ultimele topicuri pe forum</b></td></tr>
<tr><td>'.To(9).'</td></tr>
</tbody></table>
</td>
<td valign="top" width="32%">
<table border="0" cellpadding="2" cellspacing="0" width="100%">
<tbody><tr><td align="left" style="COLOR:#000000;font-size:12px;"><b>Ultimele programe adaugate</b></td></tr>
<tr><td>'.Dow(9).'</td></tr>
</tbody></table>
</td>
<td valign="top" width="21%">
<table border="0" cellpadding="2" cellspacing="0" width="100%">
<tbody><tr><td align="left" style="COLOR:#000000;font-size:12px;"><b>Ultimele cautari</b></td></tr>
<tr><td>'.Cuv(9).'</td></tr>
</tbody></table>
</td>
</tr></tbody>
</table>
</tr></table>
</td>
<!--top_ads_eof-->
</tr>
<tr>
<td valign="top" width="80%">
<!--Search_results-->
'.$results_html.'
<!--Search_results_eof-->
</td>
<!--side_ads-->
<td valign="top">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<span style="FONT-SIZE: 10px; COLOR: #666666; FONT-FAMILY: arial">PENTRU TINE</span>
</td>
</tr>
<tr>
<td align="left">
<div style="padding-top:5px">
<table border="0" width="188" bgcolor="#f8fff5" style="border: 1px; border-style: solid; border-color: #b6dff6"><tr>
<td style="padding-top:10px;padding-left:10px;padding-bottom:10px;padding-right:10px;">
<center><span style="FONT-SIZE: 10px; COLOR: #666666; FONT-FAMILY: arial"><b><font color="#FF0000">Mobile Mania</FONT></b></span></center><Br>
<img src=http://www.bestweb.ro/punct.gif border=0 width=180 height=0><br>
<center>
<a href="http://sms.bestweb.ro"><img src="http://sms.bestweb.ro/promo/all.gif" border="0"></a>
</center>
</td>
</tr>
</table>
</div>
<div style="padding-top:5px">
<table border="0" width="188" bgcolor="#f8fff5" style="border: 1px; border-style: solid; border-color: #b6dff6"><tr>
<td style="padding-top:10px;padding-left:10px;padding-bottom:10px;padding-right:10px;">
<img src=http://www.bestweb.ro/punct.gif border=0 width=180 height=0><br>
<center>
<!-- affiliate code -->
<script language=javascript src=http://ads.neogen.ro/affiliates/ads.php?VERTI%0D%10></script>
<!-- end affiliate code -->
</center>
</td>
</tr>
</table>
</div>
<div style="padding-top:5px">
<table border="0" width="188" bgcolor="#f8fff5" style="border: 1px; border-style: solid; border-color: #b6dff6"><tr>
<td style="padding-top:10px;padding-left:10px;padding-bottom:10px;padding-right:10px;"><center>
<span style="FONT-SIZE: 10px; COLOR: #666666; FONT-FAMILY: arial"><b>Cautari asemanatoare</b></span></center><br>
<img src=http://www.bestweb.ro/punct.gif border=0 width=180 height=0><br>
<center>';
content .='
</center>
</td>
</tr>
</table>
</div><div style="padding-top:5px">
<table border="0" width="188" bgcolor="#f8fff5" style="border: 1px; border-style: solid; border-color: #b6dff6"><tr>
<td style="padding-top:10px;padding-left:10px;padding-bottom:10px;padding-right:10px;"><center>
<span style="FONT-SIZE: 10px; COLOR: #666666; FONT-FAMILY: arial"><b>Top cautari</b></span></center><br>
<img src=http://www.bestweb.ro/punct.gif border=0 width=180 height=0><br>
<center>'.showLastTop(15).'</center>
</td>
</tr>
</table>
</div>
<div style="padding-top:5px">
<table border="0" width="188" bgcolor="#f8fff5" style="border: 1px; border-style: solid; border-color: #b6dff6"><tr>
<td style="padding-top:10px;padding-left:10px;padding-bottom:10px;padding-right:10px;"><center>
<span style="FONT-SIZE: 10px; COLOR: #666666; FONT-FAMILY: arial"><b>Ultimele programe adaugate</b></span></center><br>
<img src=http://www.bestweb.ro/punct.gif border=0 width=180 height=0><br>
<center>'.showLastdown(15).'</center>
</td>
</tr>
</table>
</div>
</div>
</td></tr>
</table>
</td>
<!--side_ads_eof-->
</tr>
<tr>
<!--bottom_ads-->
<td align="left" colspan="2">
<table border="0" width="100%" bgcolor="#f8fff5" style="border: 1px; border-style: solid; border-color: #b6dff6">
<tr>
<td align="left">Ultimile cautari:
'.showLast(3).'
<td width="150" valign="top" align="RIGHT"><span style="FONT-SIZE: 10px; COLOR: #666666; FONT-FAMILY: arial">CAUTARI</span></td></tr></table>
</td>
<!--bottom_ads_eof-->
</tr>
</table>
<br>
<form method="get">
<DIV class="searchBarbottom">
<TABLE cellSpacing=0 cellPadding=0 border=0 width="100%" height="40">
<TR>
<TD align=center>
<SPAN class=query>
<INPUT maxLength=200 size=40 name=search value="'.$parsed_keywords.'">
<INPUT type=submit value=" Search ">
<INPUT type=hidden value="'.$type.'" name="type">
</SPAN>
</TD>
</TR>
</TABLE>
</div>
</form>';
if ($_settings->is_cache_used() && ($result === FALSE)){
add_data_to_cache($_SERVER['QUERY_STRING'],$content,$_settings->get_cache_time(),$_settings->get_cache_size());
}
}else{
$content = $result;
}
}
$titlu = '
<HTML>
<HEAD>
<TITLE>cauta.BestWeb.ro '.$parsed_keywords.'</TITLE>';
echo $titlu;
echo $_settings->get_header();
echo $content;
echo $_settings->get_footer();
?>
A Little Knowledge Is A Very Dangerous Thing.......
That Makes Me A Lethal Weapon !!!!!!!!
Contract PHP Programming
The same..a blank page!
But remeber..the original code is work 100% ok!





But all I've done is send you back your original code !!!!!!!!!Originally Posted by sosoro
I just removed the bits I'd inserted, and posted the code here ?
The link to your original code has disappeard, send me the original code again.
A Little Knowledge Is A Very Dangerous Thing.......
That Makes Me A Lethal Weapon !!!!!!!!
Contract PHP Programming





Try this
PHP Code:<?
include("main_inc.php");
include("ettings_class.php");
include("pager_class.php");
include("includes/ads.php");
include("last_s.php");
include("last_dreapta.php");
include("last_download.php");
include("last_top.php");
include("last_extra.php");
db_connect();
$_settings = new Settings();
$search_cats = array('web'=>'Web','news'=>'Stiri','images'=>'Poze','video'=>'Video','audio'=>'Audio','shopping'=>'Shopping');
//array('web'=>'Web','news'=>'News','images'=>'Pictures','video'=>'Video','audio'=>'Audio','shopping'=>'Shopping');
$type = isset($_GET['type']) ? $_GET['type'] : 'web';
$keywords = isset($_GET['search']) ? $_GET['search'] : '';
$parsed_keywords = htmlspecialchars(chop($keywords));
$prepared_keywords = str_replace(" ","+",chop($keywords));
$tabs = "";
if ($type == 'compare'){
$old_type = $type;
$type = 'shopping';
}else
$old_type = $type;
foreach($search_cats as $search_type=>$display_name){
if ($search_type == $type){
$tabs .= '';
}else{
$tabs .= '';
}
}
if ((strlen(chop($keywords)) == 0)){
$content = '
<table width="100%" cellSpacing=0 cellPadding=0>
<tr><td align="center">
<SPAN class=tabSpace></SPAN><A class=tabOn href="http://www.bestweb.ro">Home</A><SPAN class=tabSpace></SPAN><A class=tabOff href="http://chat.bestweb.ro">Chat</A><SPAN class=tabSpace></SPAN><A class=tabOff href="http://www.bestweb.ro/get">Download</A><SPAN class=tabSpace></SPAN><A class=tabOff href="http://forum.bestweb.ro">Forum</A><SPAN class=tabSpace></SPAN><A class=tabOff href="http://sms.bestweb.ro">SMS & GSM</A><SPAN class=tabSpace></SPAN>
</td></tr></table>
<DIV class="searchBar2">
<TABLE cellSpacing=0 cellPadding=0 border=0 width="100%" height="70">
<TR>
<TD align=center>
<SPAN class=query>
<form name="searchform" onSubmit="return dosearch();">
<input type="text" name="searchterms" value="'.$parsed_keywords.'">
<select name="sengines">
<option value="http://www.bestweb.ro/get/cauta.html?query=" selected>in Download</option>
<option value="http://cauta.bestweb.ro/?type=shopping&search=" selected>in Shopping</option>
<option value="http://cauta.bestweb.ro/?type=news&search=" selected>in Stiri</option>
<option value="http://cauta.bestweb.ro/?type=images&search=" selected>in Poze</option>
<option value="http://cauta.bestweb.ro/?type=video&search=" selected>in Video</option>
<option value="http://cauta.bestweb.ro/?type=audio&search=" selected>in Audio</option>
<option value="http://cauta.bestweb.ro/?type=web&search=" selected>pe Web</option>
'.$tabs.'
</select>
<input type="submit" name="SearchSubmit" value="Search">
</form>
</SPAN>
</TD>
</TR>
</TABLE>
</DIV>
</form>';
}else{
$from_cache = FALSE;
add_stat_to_db($prepared_keywords,$type);
if ($_settings->is_cache_used()){
$result = check_chache($_SERVER['QUERY_STRING'],$_settings->get_cache_time());
}else
$result = TRUE;
$type = $old_type;
if (($_settings->is_cache_used() && ($result === FALSE)) || ($result === TRUE)){
switch ($type){
case 'web':{
include("includes/classes/web_search_class.php");
$results = new WebSearch($_settings,$prepared_keywords);
$results_html = $results->get_results();
$total_found_string = $results->m_total_found_string;
}break;
case 'news':{
include("includes/classes/news_search_class.php");
$results = new NewsSearch($_settings,$prepared_keywords);
$results_html = $results->get_results();
$total_found_string = $results->m_total_found_string;
}break;
case 'images':{
include("includes/classes/images_search_class.php");
$results = new ImagesSearch($_settings,$prepared_keywords);
$results_html = $results->get_results();
$total_found_string = $results->m_total_found_string;
}break;
case 'video':{
include("includes/classes/video_search_class.php");
$results = new VideoSearch($_settings,$prepared_keywords);
$results_html = $results->get_results();
$total_found_string = $results->m_total_found_string;
}break;
case 'audio':{
include("includes/classes/audio_search_class.php");
$results = new AudioSearch($_settings,$prepared_keywords);
$results_html = $results->get_results();
$total_found_string = $results->m_total_found_string;
}break;
case 'shopping':{
include("includes/classes/shopping_search_class.php");
$results = new ShoppingSearch($_settings,$prepared_keywords);
$results_html = $results->get_results();
$total_found_string = $results->m_total_found_string;
}break;
case 'compare':{
include("includes/classes/compare_shopping_search_class.php");
$results = new CompareShoppingSearch($_settings,$prepared_keywords);
$results_html = $results->get_results();
$total_found_string = $results->m_total_found_string;
}break;
}
$adsp = isset($_GET['pos']) ? $_GET['pos'] : 1;
$top_ads = get_ads('top',$prepared_keywords,$adsp);
$side_ads = get_ads('side',$prepared_keywords,$adsp);
$bottom_ads = get_ads('bottom',$prepared_keywords,$adsp);
if ($type == 'compare')
$type = 'shopping';
$content = '
<table width="100%" cellSpacing=0 cellPadding=0>
<tr><td align="center">
<SPAN class=tabSpace></SPAN><A class=tabOn href="http://www.bestweb.ro">Home</A><SPAN class=tabSpace></SPAN><A class=tabOff href="http://chat.bestweb.ro">Chat</A><SPAN class=tabSpace></SPAN><A class=tabOff href="http://www.bestweb.ro/get">Download</A><SPAN class=tabSpace></SPAN><A class=tabOff href="http://forum.bestweb.ro">Forum</A><SPAN class=tabSpace></SPAN><A class=tabOff href="http://sms.bestweb.ro">SMS & GSM</A><SPAN class=tabSpace></SPAN>
</td></tr></table>
<DIV class="searchBar2">
<TABLE cellSpacing=0 cellPadding=0 border=0 width="100%" height="70">
<TR>
<TD align=center>
<SPAN class=query>
<form name="searchform" onSubmit="return dosearch();">
<input type="text" name="searchterms" value="'.$parsed_keywords.'">
<select name="sengines">
<option value="http://www.bestweb.ro/get/cauta.html?query=" selected>in Download</option>
<option value="http://cauta.bestweb.ro/?type=shopping&search=" selected>in Shopping</option>
<option value="http://cauta.bestweb.ro/?type=news&search=" selected>in Stiri</option>
<option value="http://cauta.bestweb.ro/?type=images&search=" selected>in Poze</option>
<option value="http://cauta.bestweb.ro/?type=video&search=" selected>in Video</option>
<option value="http://cauta.bestweb.ro/?type=audio&search=" selected>in Audio</option>
<option value="http://cauta.bestweb.ro/?type=web&search=" selected>pe Web</option>
'.$tabs.'
</select>
<input type="submit" name="SearchSubmit" value="Search">
</form>
</SPAN>
</TD>
</TR>
</TABLE>
</DIV>
</form>
<DIV class=resultHeading>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border="0">
<TR>
<TD class=inf align="right">
'.$total_found_string.'
</TD>
</TR>
</TABLE>
</DIV>
<table width="100%" border="0">
<tr>
<!--top_ads-->
<td align="left" colspan="2">
<table border="0" width="100%" bgcolor="#f8fff5" style="border: 1px; border-style: solid; border-color: #b6dff6">
<tr>
<td align="left">
<table border="0" cellpadding="5" cellspacing="0" width="100%" bgcolor="#F8FFF5" bordercolor="#111111">
<tbody><tr>
<td valign="top" width="47%">
<table border="0" cellpadding="2" cellspacing="0" width="100%">
<tbody><tr><td align="left" style="COLOR:#000000;font-size:12px;"><b>Ultimele topicuri pe forum</b></td></tr>
<tr><td>'.To(9).'</td></tr>
</tbody></table>
</td>
<td valign="top" width="32%">
<table border="0" cellpadding="2" cellspacing="0" width="100%">
<tbody><tr><td align="left" style="COLOR:#000000;font-size:12px;"><b>Ultimele programe adaugate</b></td></tr>
<tr><td>'.Dow(9).'</td></tr>
</tbody></table>
</td>
<td valign="top" width="21%">
<table border="0" cellpadding="2" cellspacing="0" width="100%">
<tbody><tr><td align="left" style="COLOR:#000000;font-size:12px;"><b>Ultimele cautari</b></td></tr>
<tr><td>'.Cuv(9).'</td></tr>
</tbody></table>
</td>
</tr></tbody>
</table>
</tr></table>
</td>
<!--top_ads_eof-->
</tr>
<tr>
<td valign="top" width="80%">
<!--Search_results-->
'.$results_html.'
<!--Search_results_eof-->
</td>
<!--side_ads-->
<td valign="top">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<span style="FONT-SIZE: 10px; COLOR: #666666; FONT-FAMILY: arial">PENTRU TINE</span>
</td>
</tr>
<tr>
<td align="left">
<div style="padding-top:5px">
<table border="0" width="188" bgcolor="#f8fff5" style="border: 1px; border-style: solid; border-color: #b6dff6"><tr>
<td style="padding-top:10px;padding-left:10px;padding-bottom:10px;padding-right:10px;">
<center><span style="FONT-SIZE: 10px; COLOR: #666666; FONT-FAMILY: arial"><b><font color="#FF0000">Mobile Mania</FONT></b></span></center><Br>
<img src=http://www.bestweb.ro/punct.gif border=0 width=180 height=0><br>
<center>
<a href="http://sms.bestweb.ro"><img src="http://sms.bestweb.ro/promo/all.gif" border="0"></a>
</center>
</td>
</tr>
</table>
</div>
<div style="padding-top:5px">
<table border="0" width="188" bgcolor="#f8fff5" style="border: 1px; border-style: solid; border-color: #b6dff6"><tr>
<td style="padding-top:10px;padding-left:10px;padding-bottom:10px;padding-right:10px;">
<img src=http://www.bestweb.ro/punct.gif border=0 width=180 height=0><br>
<center>
<!-- affiliate code -->
<script language=javascript src=http://ads.neogen.ro/affiliates/ads.php?VERTI%0D%10></script>
<!-- end affiliate code -->
</center>
</td>
</tr>
</table>
</div>
<div style="padding-top:5px">
<table border="0" width="188" bgcolor="#f8fff5" style="border: 1px; border-style: solid; border-color: #b6dff6"><tr>
<td style="padding-top:10px;padding-left:10px;padding-bottom:10px;padding-right:10px;"><center>
<span style="FONT-SIZE: 10px; COLOR: #666666; FONT-FAMILY: arial"><b>Cautari asemanatoare</b></span></center><br>
<img src=http://www.bestweb.ro/punct.gif border=0 width=180 height=0><br>
<center>';
//INSERT STARTS HERE
$keywords = explode("+", "motru+film");
if ($keywords[0] != NULL){
$query = "SELECT * FROM ro_terms WHERE keyword LIKE '%".$keywords[0]."%'";
for ($i=1;$i<count($keywords);$i++){
$query.= " OR keyword LIKE '%".$keywords[$i]."%'";
}
$query .= ' LIMIT 20';
}
$result = @mysql_query($query) or die(mysql_error());
if(mysql_num_rows($result)){
while($row = mysql_fetch_assoc($result)){
$cuvant = $row['keyword'];
$cuvant = str_replace("+", " ", $cuvant);
$content .= '<font size="2"><a href="http://cauta.bestweb.ro/'.$row['type'].'_'.$row['keyword'].'.html">'.$cuvant.'</a></font><br>';
}
}else{
$content .= 'Nu exista cautari similare!';
}
//INSERT FINISHES HERE
$content .='
</center>
</td>
</tr>
</table>
</div><div style="padding-top:5px">
<table border="0" width="188" bgcolor="#f8fff5" style="border: 1px; border-style: solid; border-color: #b6dff6"><tr>
<td style="padding-top:10px;padding-left:10px;padding-bottom:10px;padding-right:10px;"><center>
<span style="FONT-SIZE: 10px; COLOR: #666666; FONT-FAMILY: arial"><b>Top cautari</b></span></center><br>
<img src=http://www.bestweb.ro/punct.gif border=0 width=180 height=0><br>
<center>'.showLastTop(15).'</center>
</td>
</tr>
</table>
</div>
<div style="padding-top:5px">
<table border="0" width="188" bgcolor="#f8fff5" style="border: 1px; border-style: solid; border-color: #b6dff6"><tr>
<td style="padding-top:10px;padding-left:10px;padding-bottom:10px;padding-right:10px;"><center>
<span style="FONT-SIZE: 10px; COLOR: #666666; FONT-FAMILY: arial"><b>Ultimele programe adaugate</b></span></center><br>
<img src=http://www.bestweb.ro/punct.gif border=0 width=180 height=0><br>
<center>'.showLastdown(15).'</center>
</td>
</tr>
</table>
</div>
</div>
</td></tr>
</table>
</td>
<!--side_ads_eof-->
</tr>
<tr>
<!--bottom_ads-->
<td align="left" colspan="2">
<table border="0" width="100%" bgcolor="#f8fff5" style="border: 1px; border-style: solid; border-color: #b6dff6">
<tr>
<td align="left">Ultimile cautari:
'.showLast(3).'
<td width="150" valign="top" align="RIGHT"><span style="FONT-SIZE: 10px; COLOR: #666666; FONT-FAMILY: arial">CAUTARI</span></td></tr></table>
</td>
<!--bottom_ads_eof-->
</tr>
</table>
<br>
<form method="get">
<DIV class="searchBarbottom">
<TABLE cellSpacing=0 cellPadding=0 border=0 width="100%" height="40">
<TR>
<TD align=center>
<SPAN class=query>
<INPUT maxLength=200 size=40 name=search value="'.$parsed_keywords.'">
<INPUT type=submit value=" Search ">
<INPUT type=hidden value="'.$type.'" name="type">
</SPAN>
</TD>
</TR>
</TABLE>
</div>
</form>';
if ($_settings->is_cache_used() && ($result === FALSE)){
add_data_to_cache($_SERVER['QUERY_STRING'],$content,$_settings->get_cache_time(),$_settings->get_cache_size());
}
}else{
$content = $result;
}
}
$titlu = '
<HTML>
<HEAD>
<TITLE>cauta.BestWeb.ro '.$parsed_keywords.'</TITLE>';
echo $titlu;
echo $_settings->get_header();
echo $content;
echo $_settings->get_footer();
?>
A Little Knowledge Is A Very Dangerous Thing.......
That Makes Me A Lethal Weapon !!!!!!!!
Contract PHP Programming
If you're getting blank pages, you have one problem that you need to solve before anything else. You need to turn on display of errors, otherwise you'll never know what it is exactly that is not working. You cannot debug like that.
Open your php.ini file and go to the section on Error handling. You should set the "display_errors" property to "on":
display_errors = On
Perhaps this will help you to describe more clearly what it is that is going wrong.

Your error reporting in your php.ini is probably set to 'off', and you should also set the reporting level to:
error_reporting = E_ALL
This will show you every error and notice.
However, if you are in a production environment make sure to turn the error reporting back to 'off' after you figure out what is wrong.
Mandes still don't work ... The same blank page
I don't have acces to php.ini on my webhost!
So...how can i transfor this code:
<?php
// Connect to and select database
mysql_connect('localhost', '', '');
mysql_select_db('');
$keywords = explode("+", "motru+film");
if ($keywords[0] != NULL)
{
$query = "SELECT * FROM ro_terms WHERE keyword LIKE '%".$keywords[0]."%'";
for ($i=1;$i<count($keywords);$i++)
{
$query.= " OR keyword LIKE '%".$keywords[$i]."%'";
}
$query .= ' LIMIT 20';
}
$result = @mysql_query($query) or die(mysql_error());
if(mysql_num_rows($result))
{
while($row = mysql_fetch_assoc($result))
{
$cuvant = $row['keyword'];
$cuvant = str_replace("+", " ", $cuvant);
echo = '<font size="2"><a href="http://cauta.bestweb.ro/'.$row['type'].'_'.$row['keyword'].'.html">'.$cuvant.'</a></font><br>';
}
}
else
{
echo = 'Nu exista cautari similare!';
}
?>
into a function?
Because after that if i call the function in the page will work
===================================================
For example:
<?php
// Connect to and select database
mysql_connect('localhost', 's', 's');
mysql_select_db('');
function To($num){
$display = ''; // Empty the display string
$query = "SELECT * FROM `forum_topics` ORDER BY `topic_id` DESC LIMIT $num";
$result = @mysql_query($query);
if(!$result){
$display = "No last topics!<br>".mysql_error();
}
else
{
while($row = mysql_fetch_array($result)){
$display .= '<a style="COLOR: #0066cc;font-size:12px;" href="http://forum.bestweb.ro/topic'.$row['topic_id'].'.html" title="'.$row['topic_title'].'">'.$row['topic_title'].'</a><br>';
}
}
return $display; // Send the $display varaiable back
// to the other page.
}
?>
and if i nlucde the page with that function and i add '.To(9).' will work!
You understand?
Assuming your web host will let you use .htaccess files, you can use an .htaccess file with the following in it:
php_flag display_errors on
That's the same as setting the previously mentioned property in the php.ini file.





All along I've been assuming that the second script you gave me to insert works on it's own, is this the case ?Originally Posted by sosoro
A Little Knowledge Is A Very Dangerous Thing.......
That Makes Me A Lethal Weapon !!!!!!!!
Contract PHP Programming
Ok.. display error is on..
Parse error: parse error, unexpected T_VARIABLE in index3.php on line 240
And the line 240 is:
$keywords = explode("+", "cool+film");





I dont think the problem is in that line, but in the line before, ensure that you have the functions To(9), Dow(9) and Cuv(9) included in the script.
Try taking these functions out of the line, see what happens then.
A Little Knowledge Is A Very Dangerous Thing.......
That Makes Me A Lethal Weapon !!!!!!!!
Contract PHP Programming
Bookmarks