Topic: Confusing problem

Hey there,
I've got a really hard problem (for me). Okay, so i'm trying to include a quick-search-field. In the index.php there is a right and a left column. I want to integrate the search field in the right column and want to show the "search-results" on the left column.

The index.php is in the root folder of my server. Cutenews is in root/cutenews.

So i tried to include the cutenews/search.php of cutenews with the following code (in the index.php):

<?PHP
$PHP_SELF = 'index.php';
$QUERY_STRING = 'action=search';
include("cutenews/search.php");
?>

but this does not work...


do you know what my problem is? can anyone help me?? http://cutephp.com/forum/style_emoticons/default/sad.gif

Re: Confusing problem

Hey there,
I've got a really hard problem (for me). Okay, so i'm trying to include a quick-search-field. In the index.php there is a right and a left column. I want to integrate the search field in the right column and want to show the "search-results" on the left column.

The index.php is in the root folder of my server. Cutenews is in root/cutenews.

So i tried to include the cutenews/search.php of cutenews with the following code (in the index.php):

<?PHP
$PHP_SELF = 'index.php';
$QUERY_STRING = 'action=search';
include("cutenews/search.php");
?>

but this does not work...


do you know what my problem is? can anyone help me?? http://cutephp.com/forum/style_emoticons/default/sad.gif


Your problem seems very genuine but till now I haven't faced this but I would be waiting for replies on this thread. It can be a great experience to read them.

Re: Confusing problem

Your problem seems very genuine but till now I haven't faced this but I would be waiting for replies on this thread. It can be a great experience to read them.


yeah, but it is also still working in example2.php which is delivered from the developer(s) of cutenews.. the only question is, how to include it when the main page is not in the cutenews folder

Re: Confusing problem

Here's an excerpt from example2.php

<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>
<!-- The Quick Search Form -->
<form method="post">
    <td width="100%" align="center"> 

        <input type="text" name="story" size="14">
        <input type="hidden" name="do" value="search">
    </td>
</form>
<!-- End of the Search Form -->
</div>

From what I can see the form is sending the data via "post" method. From your code

<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>
<?PHP
$PHP_SELF = 'index.php';
$QUERY_STRING = 'action=search';
include("cutenews/search.php");
?>
</div>

You are trying to retrieve it via a "get" method. Also the variable names do not match  http://cutephp.com/forum/style_emoticons/default/blink.gif

Re: Confusing problem

hey there, thanks for the answer, but can you tell me where i do use the "get-method"? or can you tell me how i do have to edit the code and it should be?