Topic: Problem with php include of search box

Hi all!
I've tried searching the forum, but no one seems to have the same exact problem I'm dealing with.
If I've missed some thread, I'm sorry... My search lasted 2 hours and I'm quite tired at the moment.

I'll try to explain the problem as best as I can, but please bear in mind that english's not my native language and that my knowledge of PHP it's pretty much non-existent.

Anyway, I'm trying to include the search box in my index.php and, to do so, I used this sintax:

<div id="search">
<?php 
    include("/membri/steampunkcreations/cutenews/search.php"); 
?>         
</div>

Since I want the search box and the news to appear on the same page, I've also added the following code:

<div id="news">
<?php
    $number = "10";
    $template = "default";
    include("/membri/steampunkcreations/cutenews/show_news.php");
?>
</div>

Now, the problem is that, when I include search.php, everything - except for my background image, disappear from the page:
https://cutephp.com/forum/uploads/monthly_02_2014/post-131672-1392154012.jpg
Furthermore, as you can see from the image above, under the search box appears the following test:

@SYSLOG: INTERNAL ERROR[2]

.

If someone could help me, I would really appreciate it.

Thanks in advance!

Re: Problem with php include of search box

In CuteNews search and news cannot be applied in one frame. One of the solutions is to use iframe, where search will be separated from news. Or you can insert $static = true; before newsblocks, i.e. there's only one build possible:

if ($_GET['search'])
{
     include 'search.php';
}
else
{
     include 'show_news.php';
}

Optionally, you can use this branching for one of the blocks, and another program logic type for other blocks. It all depends on the way blocks display is coded.

Best regards,
CN Support team

Posts: 3

Pages 1

You must login or register to post a reply

CutePHP Forums → Problem Solving / Help & Support → Problem with php include of search box